Class SimpleExecutorsModule
java.lang.Object
com.google.inject.PrivateModule
dev.getelements.elements.rt.guice.SimpleExecutorsModule
- All Implemented Interfaces:
com.google.inject.Module
public class SimpleExecutorsModule
extends com.google.inject.PrivateModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Determines the default number of scheduler threads as the number of available processors plus one.withSchedulerThreads
(int threads) Specifies the number of scheduler threads.Methods inherited from class com.google.inject.PrivateModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, expose, expose, expose, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
SimpleExecutorsModule
public SimpleExecutorsModule()
-
-
Method Details
-
withDefaultSchedulerThreads
Determines the default number of scheduler threads as the number of available processors plus one.- Returns:
- this instance
-
withSchedulerThreads
Specifies the number of scheduler threads. This number typically can be set low as the actual scheduler threads defer their work to a cached thread pool. Typically this is set to 1+ the currently availble CPUs- Parameters:
threads
- the number of threads- Returns:
- this instance
-
configure
protected void configure()- Specified by:
configure
in classcom.google.inject.PrivateModule
-