Package io.servicetalk.transport.netty
Class NettyIoExecutors
java.lang.Object
io.servicetalk.transport.netty.NettyIoExecutors
Factory methods to create
IoExecutor
s using Netty as the transport.-
Method Summary
Modifier and TypeMethodDescriptionstatic IoExecutor
Creates a newIoExecutor
with the default number ofioThreads
.static IoExecutor
createIoExecutor
(int ioThreads) Creates a newIoExecutor
with the specified number ofioThreads
.static <T extends Thread & IoThreadFactory.IoThread>
IoExecutorcreateIoExecutor
(int ioThreads, IoThreadFactory<T> threadFactory) Creates a newIoExecutor
with the specified number ofioThreads
.static IoExecutor
createIoExecutor
(int ioThreads, String threadNamePrefix) Creates a newIoExecutor
with the specified number ofioThreads
.static <T extends Thread & IoThreadFactory.IoThread>
IoExecutorcreateIoExecutor
(IoThreadFactory<T> threadFactory) Creates a newIoExecutor
with the default number ofioThreads
.static IoExecutor
createIoExecutor
(String threadNamePrefix) Creates a newIoExecutor
with the default number ofioThreads
.
-
Method Details
-
createIoExecutor
public static <T extends Thread & IoThreadFactory.IoThread> IoExecutor createIoExecutor(int ioThreads, IoThreadFactory<T> threadFactory) Creates a newIoExecutor
with 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
- theIoThreadFactory
to use.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutor
with 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 newIoExecutor
with the default number ofioThreads
.- Type Parameters:
T
- Type of threads created byIoThreadFactory
- Parameters:
threadFactory
- theIoThreadFactory
to use.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutor
with the default number ofioThreads
.- Parameters:
threadNamePrefix
- the name prefix used for the createdThread
s.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutor
with the specified number ofioThreads
.- Parameters:
ioThreads
- number of threads or0
(zero) to use the default value.threadNamePrefix
- the name prefix used for the createdThread
s.- Returns:
- The created
IoExecutor
-
createIoExecutor
Creates a newIoExecutor
with the default number ofioThreads
.- Returns:
- The created
IoExecutor
-