Package ratpack.exec
Interface ExecControllerSpec.EventLoopSpec
-
- All Known Subinterfaces:
ExecControllerSpec.ComputeSpec
- Enclosing interface:
- ExecControllerSpec
public static interface ExecControllerSpec.EventLoopSpec
A specification for building Netty event loop groups.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExecControllerSpec.EventLoopSpec
eventLoopGroup(BiFunction<Integer,ThreadFactory,io.netty.channel.EventLoopGroup> eventLoopGroupFactory)
Specify a factory that generates NettyEventLoopGroup
instances with the arguments.ExecControllerSpec.EventLoopSpec
prefix(String prefix)
Specify the thread prefix to utilize when constructing new threads from this group.ExecControllerSpec.EventLoopSpec
priority(int priority)
Specify the thread priority for threads created by this group.ExecControllerSpec.EventLoopSpec
threads(int threads)
Specify the number of threads for this group.
-
-
-
Method Detail
-
threads
ExecControllerSpec.EventLoopSpec threads(int threads)
Specify the number of threads for this group.- Parameters:
threads
- the number of threads- Returns:
this
-
prefix
ExecControllerSpec.EventLoopSpec prefix(String prefix)
Specify the thread prefix to utilize when constructing new threads from this group.- Parameters:
prefix
- the thread name prefix- Returns:
this
-
priority
ExecControllerSpec.EventLoopSpec priority(int priority)
Specify the thread priority for threads created by this group.- Parameters:
priority
- the thread priority- Returns:
this
- See Also:
Thread.MAX_PRIORITY
,Thread.MIN_PRIORITY
,Thread.NORM_PRIORITY
-
eventLoopGroup
ExecControllerSpec.EventLoopSpec eventLoopGroup(BiFunction<Integer,ThreadFactory,io.netty.channel.EventLoopGroup> eventLoopGroupFactory)
Specify a factory that generates NettyEventLoopGroup
instances with the arguments.The default value for this factory is
TransportDetector.eventLoopGroup(int, ThreadFactory)
which will automatically configure the most optimization implementation available on the current system in the following order:Epoll
KQueue
NIO
- Parameters:
eventLoopGroupFactory
- a factory that creates event loop group instances- Returns:
this
-
-