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 BatchServiceBatchContainerServiceExceptionpublic void shutdown()
throws BatchContainerServiceException
shutdown in interface BatchThreadPoolServiceBatchContainerServiceExceptionpublic void executeTask(Runnable work, Object config)
BatchThreadPoolServiceexecuteTask in interface BatchThreadPoolServicework - 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 © 2023 The Apache Software Foundation. All rights reserved.