com.ibm.batch.container.services.impl
Class AbstractThreadPoolServiceImpl

java.lang.Object
  extended by com.ibm.batch.container.services.impl.AbstractThreadPoolServiceImpl
All Implemented Interfaces:
IBatchServiceBase, IBatchThreadPoolService
Direct Known Subclasses:
GlassfishThreadPoolServiceImpl, JSEThreadPoolServiceImpl

public abstract class AbstractThreadPoolServiceImpl
extends Object
implements IBatchThreadPoolService


Field Summary
protected  ExecutorService executorService
           
 
Constructor Summary
AbstractThreadPoolServiceImpl()
           
 
Method Summary
 ParallelTaskResult executeParallelTask(BatchWorkUnit work, Object config)
          Runs the given task.
 void executeTask(BatchWorkUnit work, Object config)
          (Required) Runs the given task.
abstract  void init(IBatchConfig pgcConfig)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executorService

protected ExecutorService executorService
Constructor Detail

AbstractThreadPoolServiceImpl

public AbstractThreadPoolServiceImpl()
Method Detail

init

public abstract void init(IBatchConfig pgcConfig)
                   throws BatchContainerServiceException
Specified by:
init in interface IBatchServiceBase
Throws:
BatchContainerServiceException

shutdown

public void shutdown()
              throws BatchContainerServiceException
Specified by:
shutdown in interface IBatchServiceBase
Throws:
BatchContainerServiceException

executeTask

public void executeTask(BatchWorkUnit work,
                        Object config)
Description copied from interface: IBatchThreadPoolService
(Required) Runs the given task. A task is usually short lived

Specified by:
executeTask in interface IBatchThreadPoolService
Parameters:
work - The task to execute
config - 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(BatchWorkUnit work,
                                              Object config)
Description copied from interface: IBatchThreadPoolService
Runs the given task. A task is usually short lived

Specified by:
executeParallelTask in interface IBatchThreadPoolService
Parameters:
work - The task to execute
config - 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 © 2013. All Rights Reserved.