Class Router4<C extends io.netty.channel.Channel>
- java.lang.Object
-
- com.linkedin.alpini.router.impl.netty4.Router4<C>
-
- All Implemented Interfaces:
Router.Builder
,Router.PipelineFactory<io.netty.channel.ChannelHandler>
public class Router4<C extends io.netty.channel.Channel> extends java.lang.Object implements Router.Builder, Router.PipelineFactory<io.netty.channel.ChannelHandler>
-
-
Field Summary
-
Fields inherited from interface com.linkedin.alpini.router.impl.Router.Builder
HANDSHAKE_TIMEOUT_MILLIS, MINIMUM_IDLE_TIMEOUT_MILLIS, MINIMUM_MAX_CHUNK_SIZE, MINIMUM_MAX_CONTENT_LENGTH, MINIMUM_MAX_HEADER_SIZE, MINIMUM_MAX_INITIAL_LINE_LENGTH
-
-
Constructor Summary
Constructors Constructor Description Router4(ScatterGatherHelper scatterGatherHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Router.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeChunkAggregator(java.lang.String name, java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
Router.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeHttpRequestHandler(java.lang.String name, java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
Router.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeHttpServerCodec(java.lang.String name, java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
Router.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeIdleStateHandler(java.lang.String name, java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
<T> Router.Builder
addBootstrapFilter(java.util.function.Function<T,T> function)
Router.Builder
appWorkerChannelMaxMemorySize(long maxChannelMemorySize)
Router.Builder
appWorkerCorePoolSize(int corePoolSize)
Router.Builder
appWorkerKeepAliveSeconds(long appWorkerKeepAliveSeconds)
Router.Builder
appWorkerTotalMaxMemorySize(long maxTotalMemorySize)
<CHANNEL_PIPELINE>
Router.BuilderbeforeChunkAggregator(java.lang.Class<CHANNEL_PIPELINE> pipelineClass, java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
<CHANNEL_PIPELINE>
Router.BuilderbeforeHttpRequestHandler(java.lang.Class<CHANNEL_PIPELINE> pipelineClass, java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
<CHANNEL_PIPELINE>
Router.BuilderbeforeHttpServerCodec(java.lang.Class<CHANNEL_PIPELINE> pipelineClass, java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
<CHANNEL_PIPELINE>
Router.BuilderbeforeIdleStateHandler(java.lang.Class<CHANNEL_PIPELINE> pipelineClass, java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
<POOL_TYPE>
Router.BuilderbossPoolBuilder(java.lang.Class<POOL_TYPE> poolClass, java.util.function.Function<java.util.concurrent.Executor,POOL_TYPE> builder)
Router.Builder
bossPoolSize(int bossPoolSize)
Router
build()
Router.Builder
builder()
Router.Builder
connectionLimit(int connectionLimit)
Router.Builder
connectionLimit(java.util.function.IntSupplier connectionLimit)
Router.Builder
enableInboundHttp2(boolean enableHttp2)
Router.Builder
executor(java.util.concurrent.Executor executor)
<R extends ShutdownableResource,F extends ResourceRegistry.Factory<R>>
Ffactory(java.lang.Class<F> clazz)
Router.Builder
handshakeTimeout(long time, java.util.concurrent.TimeUnit unit)
Router.Builder
http2HeaderTableSize(int http2HeaderTableSize)
Router.Builder
http2InitialWindowSize(int http2InitialWindowSize)
Router.Builder
http2MaxConcurrentStreams(int http2MaxConcurrentStreams)
Router.Builder
http2MaxFrameSize(int http2MaxFrameSize)
Router.Builder
http2MaxHeaderListSize(int http2MaxHeaderListSize)
Router.Builder
idleTimeout(long time, java.util.concurrent.TimeUnit unit)
<POOL_TYPE>
Router.BuilderioWorkerPoolBuilder(java.lang.Class<POOL_TYPE> poolClass, java.util.function.Function<java.util.concurrent.Executor,POOL_TYPE> builder)
Router.Builder
ioWorkerPoolSize(int ioWorkerPoolSize)
Router.Builder
maxChunkSize(int maxChunkSize)
Router.Builder
maxContentLength(long maxContentLength)
Router.Builder
maxHeaderSize(int maxHeaderSize)
Router.Builder
maxInitialLineLength(int maxInitialLineLength)
Router.Builder
name(java.lang.String name)
Netty
nettyVersion()
<CHANNEL_HANDLER>
Router.PipelineFactory<CHANNEL_HANDLER>pipelineFactory(java.lang.Class<CHANNEL_HANDLER> handlerClass)
Router.Builder
resourceRegistry(ResourceRegistry resourceRegistry)
Router.Builder
serverSocketChannel(java.lang.Class<?> serverSocketChannel)
Router.Builder
serverSocketOptions(java.lang.String key, java.lang.Object value)
Router.Builder
serverSocketOptions(java.util.Map<java.lang.String,java.lang.Object> serverSocketOptions)
Router.Builder
threadFactory(java.util.concurrent.ThreadFactory threadFactory)
Router.Builder
timeoutProcessor(RouterTimeoutProcessor timeoutProcessor)
Router.Builder
useCustomMultiplexHandler(boolean useCustomMultiplexHandler)
Router.Builder
workerExecutor(java.util.concurrent.Executor workerExecutor)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linkedin.alpini.router.impl.Router.Builder
timeoutProcessor
-
-
-
-
Constructor Detail
-
Router4
public Router4(@Nonnull ScatterGatherHelper scatterGatherHelper)
-
-
Method Detail
-
nettyVersion
public Netty nettyVersion()
- Specified by:
nettyVersion
in interfaceRouter.Builder
-
name
public Router.Builder name(@Nonnull java.lang.String name)
- Specified by:
name
in interfaceRouter.Builder
-
resourceRegistry
public Router.Builder resourceRegistry(@Nonnull ResourceRegistry resourceRegistry)
- Specified by:
resourceRegistry
in interfaceRouter.Builder
-
threadFactory
public Router.Builder threadFactory(@Nonnull java.util.concurrent.ThreadFactory threadFactory)
- Specified by:
threadFactory
in interfaceRouter.Builder
-
serverSocketChannel
public Router.Builder serverSocketChannel(@Nonnull java.lang.Class<?> serverSocketChannel)
- Specified by:
serverSocketChannel
in interfaceRouter.Builder
-
bossPoolSize
public Router.Builder bossPoolSize(int bossPoolSize)
- Specified by:
bossPoolSize
in interfaceRouter.Builder
-
ioWorkerPoolSize
public Router.Builder ioWorkerPoolSize(int ioWorkerPoolSize)
- Specified by:
ioWorkerPoolSize
in interfaceRouter.Builder
-
ioWorkerPoolBuilder
public <POOL_TYPE> Router.Builder ioWorkerPoolBuilder(@Nonnull java.lang.Class<POOL_TYPE> poolClass, @Nonnull java.util.function.Function<java.util.concurrent.Executor,POOL_TYPE> builder)
- Specified by:
ioWorkerPoolBuilder
in interfaceRouter.Builder
-
bossPoolBuilder
public <POOL_TYPE> Router.Builder bossPoolBuilder(@Nonnull java.lang.Class<POOL_TYPE> poolClass, @Nonnull java.util.function.Function<java.util.concurrent.Executor,POOL_TYPE> builder)
- Specified by:
bossPoolBuilder
in interfaceRouter.Builder
-
executor
public Router.Builder executor(@Nonnull java.util.concurrent.Executor executor)
- Specified by:
executor
in interfaceRouter.Builder
-
workerExecutor
public Router.Builder workerExecutor(@Nonnull java.util.concurrent.Executor workerExecutor)
- Specified by:
workerExecutor
in interfaceRouter.Builder
-
appWorkerCorePoolSize
public Router.Builder appWorkerCorePoolSize(int corePoolSize)
- Specified by:
appWorkerCorePoolSize
in interfaceRouter.Builder
-
appWorkerChannelMaxMemorySize
public Router.Builder appWorkerChannelMaxMemorySize(long maxChannelMemorySize)
- Specified by:
appWorkerChannelMaxMemorySize
in interfaceRouter.Builder
-
appWorkerTotalMaxMemorySize
public Router.Builder appWorkerTotalMaxMemorySize(long maxTotalMemorySize)
- Specified by:
appWorkerTotalMaxMemorySize
in interfaceRouter.Builder
-
appWorkerKeepAliveSeconds
public Router.Builder appWorkerKeepAliveSeconds(long appWorkerKeepAliveSeconds)
- Specified by:
appWorkerKeepAliveSeconds
in interfaceRouter.Builder
-
timeoutProcessor
public Router.Builder timeoutProcessor(@Nonnull RouterTimeoutProcessor timeoutProcessor)
- Specified by:
timeoutProcessor
in interfaceRouter.Builder
-
connectionLimit
public Router.Builder connectionLimit(int connectionLimit)
- Specified by:
connectionLimit
in interfaceRouter.Builder
-
connectionLimit
public Router.Builder connectionLimit(@Nonnull java.util.function.IntSupplier connectionLimit)
- Specified by:
connectionLimit
in interfaceRouter.Builder
-
serverSocketOptions
public Router.Builder serverSocketOptions(java.util.Map<java.lang.String,java.lang.Object> serverSocketOptions)
- Specified by:
serverSocketOptions
in interfaceRouter.Builder
-
serverSocketOptions
public Router.Builder serverSocketOptions(@Nonnull java.lang.String key, java.lang.Object value)
- Specified by:
serverSocketOptions
in interfaceRouter.Builder
-
maxHeaderSize
public Router.Builder maxHeaderSize(@Nonnegative int maxHeaderSize)
- Specified by:
maxHeaderSize
in interfaceRouter.Builder
-
maxInitialLineLength
public Router.Builder maxInitialLineLength(@Nonnegative int maxInitialLineLength)
- Specified by:
maxInitialLineLength
in interfaceRouter.Builder
-
maxChunkSize
public Router.Builder maxChunkSize(@Nonnegative int maxChunkSize)
- Specified by:
maxChunkSize
in interfaceRouter.Builder
-
maxContentLength
public Router.Builder maxContentLength(@Nonnegative long maxContentLength)
- Specified by:
maxContentLength
in interfaceRouter.Builder
-
idleTimeout
public Router.Builder idleTimeout(@Nonnegative long time, @Nonnull java.util.concurrent.TimeUnit unit)
- Specified by:
idleTimeout
in interfaceRouter.Builder
-
handshakeTimeout
public Router.Builder handshakeTimeout(@Nonnegative long time, @Nonnull java.util.concurrent.TimeUnit unit)
- Specified by:
handshakeTimeout
in interfaceRouter.Builder
-
enableInboundHttp2
public Router.Builder enableInboundHttp2(boolean enableHttp2)
- Specified by:
enableInboundHttp2
in interfaceRouter.Builder
-
useCustomMultiplexHandler
public Router.Builder useCustomMultiplexHandler(boolean useCustomMultiplexHandler)
- Specified by:
useCustomMultiplexHandler
in interfaceRouter.Builder
-
http2MaxConcurrentStreams
public Router.Builder http2MaxConcurrentStreams(int http2MaxConcurrentStreams)
- Specified by:
http2MaxConcurrentStreams
in interfaceRouter.Builder
-
http2MaxFrameSize
public Router.Builder http2MaxFrameSize(int http2MaxFrameSize)
- Specified by:
http2MaxFrameSize
in interfaceRouter.Builder
-
http2InitialWindowSize
public Router.Builder http2InitialWindowSize(int http2InitialWindowSize)
- Specified by:
http2InitialWindowSize
in interfaceRouter.Builder
-
http2HeaderTableSize
public Router.Builder http2HeaderTableSize(int http2HeaderTableSize)
- Specified by:
http2HeaderTableSize
in interfaceRouter.Builder
-
http2MaxHeaderListSize
public Router.Builder http2MaxHeaderListSize(int http2MaxHeaderListSize)
- Specified by:
http2MaxHeaderListSize
in interfaceRouter.Builder
-
addBootstrapFilter
public <T> Router.Builder addBootstrapFilter(java.util.function.Function<T,T> function)
- Specified by:
addBootstrapFilter
in interfaceRouter.Builder
-
pipelineFactory
public <CHANNEL_HANDLER> Router.PipelineFactory<CHANNEL_HANDLER> pipelineFactory(@Nonnull java.lang.Class<CHANNEL_HANDLER> handlerClass)
- Specified by:
pipelineFactory
in interfaceRouter.Builder
-
beforeHttpServerCodec
public <CHANNEL_PIPELINE> Router.Builder beforeHttpServerCodec(@Nonnull java.lang.Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
- Specified by:
beforeHttpServerCodec
in interfaceRouter.Builder
-
beforeChunkAggregator
public <CHANNEL_PIPELINE> Router.Builder beforeChunkAggregator(@Nonnull java.lang.Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
- Specified by:
beforeChunkAggregator
in interfaceRouter.Builder
-
beforeIdleStateHandler
public <CHANNEL_PIPELINE> Router.Builder beforeIdleStateHandler(@Nonnull java.lang.Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
- Specified by:
beforeIdleStateHandler
in interfaceRouter.Builder
-
beforeHttpRequestHandler
public <CHANNEL_PIPELINE> Router.Builder beforeHttpRequestHandler(@Nonnull java.lang.Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull java.util.function.Consumer<CHANNEL_PIPELINE> consumer)
- Specified by:
beforeHttpRequestHandler
in interfaceRouter.Builder
-
addBeforeHttpServerCodec
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeHttpServerCodec(@Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
- Specified by:
addBeforeHttpServerCodec
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
addBeforeChunkAggregator
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeChunkAggregator(@Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
- Specified by:
addBeforeChunkAggregator
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
addBeforeIdleStateHandler
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeIdleStateHandler(@Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
- Specified by:
addBeforeIdleStateHandler
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
addBeforeHttpRequestHandler
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeHttpRequestHandler(@Nonnull java.lang.String name, @Nonnull java.util.function.Supplier<? extends io.netty.channel.ChannelHandler> supplier)
- Specified by:
addBeforeHttpRequestHandler
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
builder
public Router.Builder builder()
- Specified by:
builder
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
factory
public <R extends ShutdownableResource,F extends ResourceRegistry.Factory<R>> F factory(@Nonnull java.lang.Class<F> clazz)
-
build
public Router build()
- Specified by:
build
in interfaceRouter.Builder
-
-