NIOTransport implementations as well as providing basic
configuration for IOStrategies and thread pools.
NIOTransport, IOStrategy, ThreadPoolConfig
| Modifier and Type | Field and Description |
|---|---|
| protected AttributeBuilder | |
| protected int | |
| protected int | |
| protected IOStrategy | |
| protected ThreadPoolConfig | |
| protected int | |
| protected MemoryManager | |
| protected String | |
| protected NIOChannelDistributor | |
| protected boolean | |
| protected Processor | |
| protected ProcessorSelector | |
| protected int | |
| protected long | |
| protected boolean | |
| protected boolean | |
| protected SelectionKeyHandler | |
| protected SelectorHandler | |
| protected SelectorProvider | |
| protected int | |
| protected final Class | |
| protected ThreadPoolConfig | |
| protected int | |
| protected long |
| Access | Constructor and Description |
|---|---|
| protected | NIOTransportBuilder(final Class<? extends NIOTransport>
the class of the transportClass)NIOTransport implementation to be used.
Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public NIOTransport | |
| protected abstract NIOTransport | |
| public AttributeBuilder | |
| public int | |
| public int | |
| public IOStrategy | |
| public int | Returns: the value is per connection, not transport total.Max asynchronous write queue size in bytes |
| public MemoryManager | |
| public String | |
| public NIOChannelDistributor | getNIOChannelDistributor()
Returns: the |
| public Processor | |
| public ProcessorSelector | |
| public int | |
| public long | getReadTimeout(final TimeUnit
the timeUnit)TimeUnit to convert the result toReturns: the blocking read timeout in the specified |
| public SelectionKeyHandler | getSelectionKeyHandler()
Returns: the |
| public SelectorHandler | |
| public SelectorProvider | |
| public int | getSelectorRunnersCount()
Returns: the number of |
| public ThreadPoolConfig | getSelectorThreadPoolConfig()
Returns: the |
| protected abstract T | |
| public ThreadPoolConfig | getWorkerThreadPoolConfig()
Returns: the |
| public int | |
| public long | getWriteTimeout(final TimeUnit
the timeUnit)TimeUnit to convert the result toReturns: the value of the write timeout |
| public boolean | isOptimizedForMultiplexing()
Returns: true, if NIOTransport is configured to use AsyncQueueWriter, optimized to be used in connection multiplexing mode, or false otherwise. |
| public boolean | |
| public boolean | Returns: SO_REUSEPORTWhether both same address and same port may be reused for multiple sockets |
| public T | Returns: thisNIOTransportBuilderthe attributeBuilder)AttributeBuilder.Set the |
| public T | Returns: thisNIOTransportBuilderthe specified timeout in milliseconds clientSocketSoTimeout)Sets the timeout on socket blocking operations for the client |
| public T | setConnectionTimeout(int
the value of the connection timeout in milliseconds connectionTimeout)Returns: this |
| public T | Returns: thisNIOTransportBuilderthe ioStrategy)IOStrategy to use.
Changes the |
| public T | setMaxAsyncWriteQueueSizeInBytes(final int
the value is per connection, not transport total. maxAsyncWriteQueueSizeInBytes)Returns: this |
| public T | Returns: thisNIOTransportBuilderthe memoryManager)MemoryManager.Set the |
| public T | |
| public T | Returns: thisNIOTransportBuilderSet the |
| public T | setOptimizedForMultiplexing(final boolean
Configure NIOTransport to be optimized for connection multiplexing optimizedForMultiplexing)Returns: this |
| public T | setProcessor(Processor<E extends Context>
the default processor)Processor if a Connection does not specify a preferenceReturns: this |
| public T | setProcessorSelector(ProcessorSelector
the default processorSelector)ProcessorSelectorReturns: this |
| public T | |
| public T | Returns: this NioTransportBuilderthe new timeout value timeout, final TimeUnit the unit of the new timeout value timeUnit)Sets the value of the blocking read timeout |
| public T | Returns: thisTCPNIOTransportBuilderSO_REUSEADDR reuseAddress)Sets whether address may be reused for multiple sockets |
| public T | Returns: thisTCPNIOTransportBuilderSO_REUSEPORT reusePort)Sets whether both same address and same port may be reused for multiple sockets |
| public T | Returns: thisNIOTransportBuilderthe selectionKeyHandler)SelectionKeyHandler.Set the |
| public T | Returns: thisNIOTransportBuilderthe selectorHandler)SelectorHandler.Set the |
| public T | Returns: thisNIOTransportBuilderthe selectorProvider)SelectorProvider.Set the |
| public T | Returns: the buildernumber of channels selectorRunnersCount)Sets the number of |
| public T | Returns: this builderthe config kernelConfig)Sets the |
| public T | Returns: this builderthe config workerConfig)Sets the |
| public T | |
| public T | setWriteTimeout(final long
the new write timeout value timeout, final TimeUnit the timeUnit)TimeUnit of the timeout valueReturns: this NIOTransportBuilder |
| attributeBuilder | back to summary |
|---|---|
| protected AttributeBuilder attributeBuilder | |
| clientSocketSoTimeout | back to summary |
|---|---|
| protected int clientSocketSoTimeout | |
| connectionTimeout | back to summary |
|---|---|
| protected int connectionTimeout | |
| ioStrategy | back to summary |
|---|---|
| protected IOStrategy ioStrategy | |
| kernelConfig | back to summary |
|---|---|
| protected ThreadPoolConfig kernelConfig | |
| maxPendingBytesPerConnection | back to summary |
|---|---|
| protected int maxPendingBytesPerConnection | |
| memoryManager | back to summary |
|---|---|
| protected MemoryManager<E extends Buffer> memoryManager | |
| name | back to summary |
|---|---|
| protected String name | |
| nioChannelDistributor | back to summary |
|---|---|
| protected NIOChannelDistributor nioChannelDistributor | |
| optimizedForMultiplexing | back to summary |
|---|---|
| protected boolean optimizedForMultiplexing | |
| processor | back to summary |
|---|---|
| protected Processor<E extends Context> processor | |
| processorSelector | back to summary |
|---|---|
| protected ProcessorSelector processorSelector | |
| readBufferSize | back to summary |
|---|---|
| protected int readBufferSize | |
| readTimeout | back to summary |
|---|---|
| protected long readTimeout | |
| reuseAddress | back to summary |
|---|---|
| protected boolean reuseAddress | |
| reusePort | back to summary |
|---|---|
| protected boolean reusePort | |
| selectionKeyHandler | back to summary |
|---|---|
| protected SelectionKeyHandler selectionKeyHandler | |
| selectorHandler | back to summary |
|---|---|
| protected SelectorHandler selectorHandler | |
| selectorProvider | back to summary |
|---|---|
| protected SelectorProvider selectorProvider | |
| selectorRunnerCount | back to summary |
|---|---|
| protected int selectorRunnerCount | |
| transportClass | back to summary |
|---|---|
| protected final Class<? extends NIOTransport> transportClass | |
| workerConfig | back to summary |
|---|---|
| protected ThreadPoolConfig workerConfig | |
| writeBufferSize | back to summary |
|---|---|
| protected int writeBufferSize | |
| writeTimeout | back to summary |
|---|---|
| protected long writeTimeout | |
| NIOTransportBuilder | back to summary |
|---|---|
| protected NIOTransportBuilder(final Class<? extends NIOTransport> transportClass)
Constructs a new
The builder's worker thread pool configuration will be based on the return value of
| |
| build | back to summary |
|---|---|
public NIOTransport build()
| |
| create | back to summary |
|---|---|
| protected abstract NIOTransport create(String name) | |
| getAttributeBuilder | back to summary |
|---|---|
public AttributeBuilder getAttributeBuilder()
| |
| getClientSocketSoTimeout | back to summary |
|---|---|
public int getClientSocketSoTimeout()
| |
| getConnectionTimeout | back to summary |
|---|---|
public int getConnectionTimeout()
| |
| getIOStrategy | back to summary |
|---|---|
public IOStrategy getIOStrategy()
| |
| getMaxAsyncWriteQueueSizeInBytes | back to summary |
|---|---|
| public int getMaxAsyncWriteQueueSizeInBytes() Max asynchronous write queue size in bytes
| |
| getMemoryManager | back to summary |
|---|---|
public MemoryManager
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| getNIOChannelDistributor | back to summary |
|---|---|
public NIOChannelDistributor getNIOChannelDistributor()
| |
| getProcessor | back to summary |
|---|---|
public Processor
| |
| getProcessorSelector | back to summary |
|---|---|
public ProcessorSelector getProcessorSelector()
| |
| getReadBufferSize | back to summary |
|---|---|
public int getReadBufferSize()
| |
| getReadTimeout | back to summary |
|---|---|
public long getReadTimeout(final TimeUnit timeUnit)
| |
| getSelectionKeyHandler | back to summary |
|---|---|
public SelectionKeyHandler getSelectionKeyHandler()
| |
| getSelectorHandler | back to summary |
|---|---|
public SelectorHandler getSelectorHandler()
| |
| getSelectorProvider | back to summary |
|---|---|
public SelectorProvider getSelectorProvider()
| |
| getSelectorRunnersCount | back to summary |
|---|---|
public int getSelectorRunnersCount()
| |
| getSelectorThreadPoolConfig | back to summary |
|---|---|
public ThreadPoolConfig getSelectorThreadPoolConfig()
| |
| getThis | back to summary |
|---|---|
protected abstract T getThis()
| |
| getWorkerThreadPoolConfig | back to summary |
|---|---|
public ThreadPoolConfig getWorkerThreadPoolConfig()
| |
| getWriteBufferSize | back to summary |
|---|---|
public int getWriteBufferSize()
| |
| getWriteTimeout | back to summary |
|---|---|
public long getWriteTimeout(final TimeUnit timeUnit)
| |
| isOptimizedForMultiplexing | back to summary |
|---|---|
public boolean isOptimizedForMultiplexing()
| |
| isReuseAddress | back to summary |
|---|---|
| public boolean isReuseAddress() Whether address may be reused for multiple sockets
| |
| isReusePort | back to summary |
|---|---|
| public boolean isReusePort() Whether both same address and same port may be reused for multiple sockets
| |
| setAttributeBuilder | back to summary |
|---|---|
| public T setAttributeBuilder(AttributeBuilder attributeBuilder) Set the
| |
| setClientSocketSoTimeout | back to summary |
|---|---|
| public T setClientSocketSoTimeout(int clientSocketSoTimeout) Sets the timeout on socket blocking operations for the client
| |
| setConnectionTimeout | back to summary |
|---|---|
public T setConnectionTimeout(int connectionTimeout)
| |
| setIOStrategy | back to summary |
|---|---|
| public T setIOStrategy(final IOStrategy ioStrategy)
Changes the
| |
| setMaxAsyncWriteQueueSizeInBytes | back to summary |
|---|---|
public T setMaxAsyncWriteQueueSizeInBytes(final int maxAsyncWriteQueueSizeInBytes)
| |
| setMemoryManager | back to summary |
|---|---|
| public T setMemoryManager(final MemoryManager<E extends Buffer> memoryManager) Set the
| |
| setName | back to summary |
|---|---|
public T setName(String name)
| |
| setNIOChannelDistributor | back to summary |
|---|---|
| public T setNIOChannelDistributor(NIOChannelDistributor nioChannelDistributor) Set the
| |
| setOptimizedForMultiplexing | back to summary |
|---|---|
public T setOptimizedForMultiplexing(final boolean optimizedForMultiplexing)
| |
| setProcessor | back to summary |
|---|---|
public T setProcessor(Processor<E extends Context> processor)
| |
| setProcessorSelector | back to summary |
|---|---|
public T setProcessorSelector(ProcessorSelector processorSelector)
| |
| setReadBufferSize | back to summary |
|---|---|
public T setReadBufferSize(int readBufferSize)
| |
| setReadTimeout | back to summary |
|---|---|
| public T setReadTimeout(final long timeout, final TimeUnit timeUnit) Sets the value of the blocking read timeout
| |
| setReuseAddress | back to summary |
|---|---|
| public T setReuseAddress(boolean reuseAddress) Sets whether address may be reused for multiple sockets
| |
| setReusePort | back to summary |
|---|---|
| public T setReusePort(boolean reusePort) Sets whether both same address and same port may be reused for multiple sockets
| |
| setSelectionKeyHandler | back to summary |
|---|---|
| public T setSelectionKeyHandler(final SelectionKeyHandler selectionKeyHandler) Set the
| |
| setSelectorHandler | back to summary |
|---|---|
| public T setSelectorHandler(final SelectorHandler selectorHandler) Set the
| |
| setSelectorProvider | back to summary |
|---|---|
| public T setSelectorProvider(SelectorProvider selectorProvider) Set the
| |
| setSelectorRunnersCount | back to summary |
|---|---|
| public T setSelectorRunnersCount(final int selectorRunnersCount) Sets the number of
| |
| setSelectorThreadPoolConfig | back to summary |
|---|---|
| public T setSelectorThreadPoolConfig(final ThreadPoolConfig kernelConfig) Sets the
| |
| setWorkerThreadPoolConfig | back to summary |
|---|---|
| public T setWorkerThreadPoolConfig(final ThreadPoolConfig workerConfig) Sets the
| |
| setWriteBufferSize | back to summary |
|---|---|
public T setWriteBufferSize(int writeBufferSize)
| |
| setWriteTimeout | back to summary |
|---|---|
public T setWriteTimeout(final long timeout, final TimeUnit timeUnit)
| |