Package io.servicetalk.transport.netty
Class NettyIoExecutors
java.lang.Object
io.servicetalk.transport.netty.NettyIoExecutors
Factory methods to create
IoExecutors using Netty as the transport.-
Method Summary
Modifier and TypeMethodDescriptionstatic IoExecutorCreates a newIoExecutorwith the default number ofioThreads.static IoExecutorcreateIoExecutor(int ioThreads) Creates a newIoExecutorwith the specified number ofioThreads.static <T extends Thread & IoThreadFactory.IoThread>
IoExecutorcreateIoExecutor(int ioThreads, IoThreadFactory<T> threadFactory) Creates a newIoExecutorwith the specified number ofioThreads.static IoExecutorcreateIoExecutor(int ioThreads, String threadNamePrefix) Creates a newIoExecutorwith the specified number ofioThreads.static <T extends Thread & IoThreadFactory.IoThread>
IoExecutorcreateIoExecutor(IoThreadFactory<T> threadFactory) Creates a newIoExecutorwith the default number ofioThreads.static IoExecutorcreateIoExecutor(String threadNamePrefix) Creates a newIoExecutorwith the default number ofioThreads.
-
Method Details
-
createIoExecutor
public static <T extends Thread & IoThreadFactory.IoThread> IoExecutor createIoExecutor(int ioThreads, IoThreadFactory<T> threadFactory) Creates a newIoExecutorwith the specified number ofioThreads.- Type Parameters:
T- Type of the IO thread instances created by factory.- Parameters:
ioThreads- number of threads or0(zero) to use the default value.threadFactory- theIoThreadFactoryto use.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutorwith the specified number ofioThreads.- Parameters:
ioThreads- number of threads or0(zero) to use the default value.- Returns:
- The created
IoExecutor
-
createIoExecutor
public static <T extends Thread & IoThreadFactory.IoThread> IoExecutor createIoExecutor(IoThreadFactory<T> threadFactory) Creates a newIoExecutorwith the default number ofioThreads.- Type Parameters:
T- Type of threads created byIoThreadFactory- Parameters:
threadFactory- theIoThreadFactoryto use.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutorwith the default number ofioThreads.- Parameters:
threadNamePrefix- the name prefix used for the createdThreads.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutorwith the specified number ofioThreads.- Parameters:
ioThreads- number of threads or0(zero) to use the default value.threadNamePrefix- the name prefix used for the createdThreads.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutorwith the default number ofioThreads.- Returns:
- The created
IoExecutor
-