public class InProcessBatchManager extends Object implements IBatchManager
Can be used when batch is run within the same JVM as the console.
History is lost on restart.
REMOVE_OLD, REMOVE_SUCCESS| Constructor and Description | 
|---|
| InProcessBatchManager() | 
| Modifier and Type | Method and Description | 
|---|---|
| IBatch | addBatch(String name,
        String group,
        String uuid)Creates and adds a new Batch to the batch manager. | 
| protected void | addTo(List<IBatch> l,
     IBatch b) | 
| void | batchEnd(Batch batch) | 
| List<IBatch> | getBatches(String group,
          String name)Ordered by update date DESC | 
| Properties | getConfiguration()Get current configuration. | 
| List<IBatch> | getErrorBatches()Ordered by update date DESC | 
| List<IBatch> | getFinishedBatches()Ordered by update date DESC | 
| IBatchProgressMonitor | getMonitor(IBatch batch)Returns the batch monitor for this batch. | 
| List<IBatch> | getRunningBatches()Returns the list of batchs which are currently running. | 
| void | init() | 
| void | removeAllBatches(int scope)Removes all jobs matching the scope value. | 
| void | removeBatch(String uuid)Removes a specific job. | 
| void | setConfiguration(Properties configuration)Inject configuration for service manager. | 
public IBatch addBatch(String name, String group, String uuid)
IBatchManagerIf the batch already exists (same uuid). The existing one is returned.
NOTE: This method is not intended to be called directly.
addBatch in interface IBatchManagerAppStatus#getBatchProgressMonitor()public void batchEnd(Batch batch)
public List<IBatch> getBatches(String group, String name)
IBatchManagergetBatches in interface IBatchManagerpublic Properties getConfiguration()
IBatchManagergetConfiguration in interface IBatchManagerpublic List<IBatch> getErrorBatches()
IBatchManagergetErrorBatches in interface IBatchManagerpublic List<IBatch> getFinishedBatches()
IBatchManagergetFinishedBatches in interface IBatchManagerpublic IBatchProgressMonitor getMonitor(IBatch batch)
IBatchManagerThe same progress monitor is always returned. It is expected that only a single thread updates the monitor.
getMonitor in interface IBatchManagerpublic List<IBatch> getRunningBatches()
IBatchManagergetRunningBatches in interface IBatchManagerpublic void init()
init in interface IBatchManagerpublic void removeAllBatches(int scope)
IBatchManagerremoveAllBatches in interface IBatchManagerscope - 1 or IBatchManager.REMOVE_SUCCESSpublic void removeBatch(String uuid)
IBatchManagerremoveBatch in interface IBatchManagerpublic void setConfiguration(Properties configuration)
IBatchManagersetConfiguration in interface IBatchManagerCopyright © 2010–2016. All rights reserved.