public abstract class AbstractThreadPoolService extends Object implements BatchThreadPoolService
Modifier and Type | Field and Description |
---|---|
protected ExecutorService |
executorService |
Constructor and Description |
---|
AbstractThreadPoolService() |
Modifier and Type | Method and Description |
---|---|
void |
executeTask(Runnable work,
Object config)
(Required) Runs the given task.
|
void |
init(Properties batchConfig) |
protected abstract ExecutorService |
newExecutorService(Properties batchConfig) |
void |
shutdown() |
String |
toString() |
protected ExecutorService executorService
protected abstract ExecutorService newExecutorService(Properties batchConfig)
public void init(Properties batchConfig) throws BatchContainerServiceException
init
in interface BatchService
BatchContainerServiceException
public void shutdown() throws BatchContainerServiceException
shutdown
in interface BatchThreadPoolService
BatchContainerServiceException
public void executeTask(Runnable work, Object config)
BatchThreadPoolService
executeTask
in interface BatchThreadPoolService
work
- The task to executeconfig
- Optional configuration to customize the execution. The
Container always passes a null value. Typically used when
other user plugins wish to use the ExecutorService to execute
tasks.Copyright © 2017 The Apache Software Foundation. All rights reserved.