public class DefaultExecutors extends Object implements OddjobExecutors
Modifier and Type | Field and Description |
---|---|
static String |
POOL_SIZE_PROPERTY |
Constructor and Description |
---|
DefaultExecutors()
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
ExecutorService |
getPoolExecutor()
Provide a
ExecutorService . |
int |
getPoolSize()
Get the pool size for the scheduled executor.
|
ScheduledExecutorService |
getScheduledExecutor()
Provide a
ScheduledExecutorService . |
boolean |
isShareServices() |
void |
setPoolSize(int poolSize)
Set the pool size for the scheduled executor.
|
void |
setShareServices(boolean shareServices)
Share the same service between the executor service and the scheduled
executor service.
|
void |
stop()
Stop the services.
|
String |
toString() |
public static final String POOL_SIZE_PROPERTY
public DefaultExecutors()
public void stop()
public ScheduledExecutorService getScheduledExecutor()
OddjobExecutors
ScheduledExecutorService
.getScheduledExecutor
in interface OddjobExecutors
public ExecutorService getPoolExecutor()
OddjobExecutors
ExecutorService
. Implementations are free to
use OddjobExecutors.getScheduledExecutor()
for this, or provide
something different.getPoolExecutor
in interface OddjobExecutors
public int getPoolSize()
public void setPoolSize(int poolSize)
poolSize
- The pool size.public boolean isShareServices()
public void setShareServices(boolean shareServices)
shareServices
-