public abstract class AbstractIoServiceFactoryFactory extends AbstractLoggingBean implements IoServiceFactoryFactory, ExecutorServiceConfigurer
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ExecutorService |
executorService |
private boolean |
shutdownExecutor |
log
Modifier | Constructor and Description |
---|---|
protected |
AbstractIoServiceFactoryFactory(java.util.concurrent.ExecutorService executors,
boolean shutdownOnExit) |
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.ExecutorService |
getExecutorService() |
boolean |
isShutdownOnExit() |
void |
setExecutorService(java.util.concurrent.ExecutorService service) |
void |
setShutdownOnExit(boolean shutdown) |
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
private java.util.concurrent.ExecutorService executorService
private boolean shutdownExecutor
protected AbstractIoServiceFactoryFactory(java.util.concurrent.ExecutorService executors, boolean shutdownOnExit)
executors
- The ExecutorService
to use for spawning threads.
If null
then an internal service is allocated - in which case it
is automatically shutdown regardless of the value of the shutdownOnExit
parameter valueshutdownOnExit
- If true
then the ExecutorService.shutdownNow()
will be called (unless it is an internally allocated service which is always
closed)public java.util.concurrent.ExecutorService getExecutorService()
getExecutorService
in interface ExecutorServiceCarrier
ExecutorService
to usepublic void setExecutorService(java.util.concurrent.ExecutorService service)
setExecutorService
in interface ExecutorServiceConfigurer
public boolean isShutdownOnExit()
isShutdownOnExit
in interface ExecutorServiceCarrier
true
then the ExecutorService.shutdownNow()
will be called (unless it is an internally allocated service which is always
closed)public void setShutdownOnExit(boolean shutdown)
setShutdownOnExit
in interface ExecutorServiceConfigurer