Package ratpack.exec
Interface ExecControllerSpec
-
- All Known Subinterfaces:
ExecControllerBuilder
public interface ExecControllerSpecA mutable specification of an exec controller.- Since:
- 1.10
- See Also:
ExecControllerBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExecControllerSpecblockingThreadIdleTimeout(java.time.Duration idleTimeout)The duration to allow a non-core blocking thread to remain in the pool before terminating it.ExecControllerSpeccontextClassLoader(java.lang.ClassLoader classLoader)The context classloader to initialize threads with.ExecControllerSpecexecInitializers(java.lang.Iterable<? extends ExecInitializer> initializers)The exec initializers to use for initializing executions.ExecControllerSpecexecInterceptors(java.lang.Iterable<? extends ExecInterceptor> interceptors)The exec interceptors to use for intercepting executions.ExecControllerSpecnumThreads(int n)Sets the number of compute threads to use.
-
-
-
Method Detail
-
numThreads
ExecControllerSpec numThreads(int n)
Sets the number of compute threads to use.Defaults to
Runtime.getRuntime().availableProcessors() * 2.- Parameters:
n- the number of compute threads to use- Returns:
this
-
blockingThreadIdleTimeout
ExecControllerSpec blockingThreadIdleTimeout(java.time.Duration idleTimeout)
The duration to allow a non-core blocking thread to remain in the pool before terminating it.Defaults to 60 seconds.
- Parameters:
idleTimeout- the duration to allow a non-core blocking thread to remain in the pool before terminating it- Returns:
this
-
execInitializers
ExecControllerSpec execInitializers(java.lang.Iterable<? extends ExecInitializer> initializers)
The exec initializers to use for initializing executions.- Parameters:
initializers- the exec initializers to use for initializing executions- Returns:
this
-
execInterceptors
ExecControllerSpec execInterceptors(java.lang.Iterable<? extends ExecInterceptor> interceptors)
The exec interceptors to use for intercepting executions.- Parameters:
interceptors- exec interceptors to use for intercepting executions- Returns:
this
-
contextClassLoader
ExecControllerSpec contextClassLoader(java.lang.ClassLoader classLoader)
The context classloader to initialize threads with.Defaults to the current context classloader of the thread that created
this.- Parameters:
classLoader- the context classloader to initialize threads with- Returns:
this
-
-