Class AbstractThreadPoolServiceImpl
- java.lang.Object
-
- com.ibm.jbatch.container.services.impl.AbstractThreadPoolServiceImpl
-
- All Implemented Interfaces:
IBatchServiceBase,IBatchThreadPoolService
- Direct Known Subclasses:
BoundedThreadPoolServiceImpl,GrowableThreadPoolServiceImpl
public abstract class AbstractThreadPoolServiceImpl extends Object implements IBatchThreadPoolService
-
-
Field Summary
Fields Modifier and Type Field Description protected ExecutorServiceexecutorService
-
Constructor Summary
Constructors Constructor Description AbstractThreadPoolServiceImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ParallelTaskResultexecuteParallelTask(Runnable work, Object config)Runs the given task.voidexecuteTask(Runnable work, Object config)(Required) Runs the given task.abstract voidinit(IBatchConfig pgcConfig)voidshutdown()
-
-
-
Field Detail
-
executorService
protected ExecutorService executorService
-
-
Method Detail
-
init
public abstract void init(IBatchConfig pgcConfig) throws BatchContainerServiceException
- Specified by:
initin interfaceIBatchServiceBase- Throws:
BatchContainerServiceException
-
shutdown
public void shutdown() throws BatchContainerServiceException- Specified by:
shutdownin interfaceIBatchServiceBase- Throws:
BatchContainerServiceException
-
executeTask
public void executeTask(Runnable work, Object config)
Description copied from interface:IBatchThreadPoolService(Required) Runs the given task. A task is usually short lived- Specified by:
executeTaskin interfaceIBatchThreadPoolService- Parameters:
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.
-
executeParallelTask
public ParallelTaskResult executeParallelTask(Runnable work, Object config)
Description copied from interface:IBatchThreadPoolServiceRuns the given task. A task is usually short lived- Specified by:
executeParallelTaskin interfaceIBatchThreadPoolService- Parameters:
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.
-
-