public class ExecutorServiceModule
extends com.google.inject.AbstractModule
Modifier and Type | Method and Description |
---|---|
protected void |
configure() |
ExecutorService |
provideJvmExecutorService(configuration : javax.inject.Provider<SreConfig>,
rejectedExecutionHandler : javax.inject.Provider<RejectedExecutionHandler>)
Construct a JVM executor service.
|
ScheduledExecutorService |
provideJvmScheduledExecutorService(configuration : javax.inject.Provider<SreConfig>,
rejectedExecutionHandler : javax.inject.Provider<RejectedExecutionHandler>)
Construct a JVM scheduled executor service.
|
QuietThreadExecutorPolicy |
provideQuietThreadExecutorPolicy()
Construct a
QuietThreadExecutorPolicy . |
RejectedExecutionHandler |
provideRejectedExecutionHandler(loggerCreator : javax.inject.Provider<JulLoggerCreator>,
configuration : javax.inject.Provider<SreConfig>,
injector : com.google.inject.Injector)
Construct a handler for tasks that cannot be executed by a ThreadPoolExecutor.
|
VerboseThreadExecutorPolicy |
providesVerboseThreadExecutorPolicy(logService : javax.inject.Provider<LoggingService>)
Construct a
VerboseThreadExecutorPolicy . |
Thread.UncaughtExceptionHandler |
providetUncaughtExceptionHandler(loggerCreator : javax.inject.Provider<JulLoggerCreator>,
configuration : javax.inject.Provider<SreConfig>,
injector : com.google.inject.Injector)
Construct a handler for exceptions that are not catched.
|
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
protected def
configure() : void
configure
in class com.google.inject.AbstractModule
@Provides
@Singleton
@Pure
public def
providesVerboseThreadExecutorPolicy(logService : javax.inject.Provider<LoggingService>) : VerboseThreadExecutorPolicy
ExecutorServiceModule
VerboseThreadExecutorPolicy
.logService
- the service for logging.@Provides
@Singleton
@Pure
public def
provideQuietThreadExecutorPolicy() : QuietThreadExecutorPolicy
ExecutorServiceModule
QuietThreadExecutorPolicy
.@Provides
@Singleton
public def
provideRejectedExecutionHandler(loggerCreator : javax.inject.Provider<JulLoggerCreator>,
configuration : javax.inject.Provider<SreConfig>,
injector : com.google.inject.Injector) : RejectedExecutionHandler
ExecutorServiceModule
loggerCreator
- the logger creator.configuration
- the general configuration.injector
- the current injector@Provides
@Singleton
public def
providetUncaughtExceptionHandler(loggerCreator : javax.inject.Provider<JulLoggerCreator>,
configuration : javax.inject.Provider<SreConfig>,
injector : com.google.inject.Injector) : Thread.UncaughtExceptionHandler
ExecutorServiceModule
loggingConfig
- the bootique configuration for log4j.configuration
- the general configuration.injector
- the current injector.@Provides
@Singleton
public def
provideJvmExecutorService(configuration : javax.inject.Provider<SreConfig>,
rejectedExecutionHandler : javax.inject.Provider<RejectedExecutionHandler>) : ExecutorService
ExecutorServiceModule
configuration
- the general configuration.rejectedExecutionHandler
- the handler for rejected executions.@Provides
@Singleton
public def
provideJvmScheduledExecutorService(configuration : javax.inject.Provider<SreConfig>,
rejectedExecutionHandler : javax.inject.Provider<RejectedExecutionHandler>) : ScheduledExecutorService
ExecutorServiceModule
configuration
- the general configuration.rejectedExecutionHandler
- the handler for rejected executions.Copyright © 2021 the original authors or authors.