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)
IBatchManager
If the batch already exists (same uuid). The existing one is returned.
NOTE: This method is not intended to be called directly.
addBatch
in interface IBatchManager
AppStatus#getBatchProgressMonitor()
public void batchEnd(Batch batch)
public List<IBatch> getBatches(String group, String name)
IBatchManager
getBatches
in interface IBatchManager
public Properties getConfiguration()
IBatchManager
getConfiguration
in interface IBatchManager
public List<IBatch> getErrorBatches()
IBatchManager
getErrorBatches
in interface IBatchManager
public List<IBatch> getFinishedBatches()
IBatchManager
getFinishedBatches
in interface IBatchManager
public IBatchProgressMonitor getMonitor(IBatch batch)
IBatchManager
The same progress monitor is always returned. It is expected that only a single thread updates the monitor.
getMonitor
in interface IBatchManager
public List<IBatch> getRunningBatches()
IBatchManager
getRunningBatches
in interface IBatchManager
public void init()
init
in interface IBatchManager
public void removeAllBatches(int scope)
IBatchManager
removeAllBatches
in interface IBatchManager
scope
- 1 or IBatchManager.REMOVE_SUCCESS
public void removeBatch(String uuid)
IBatchManager
removeBatch
in interface IBatchManager
public void setConfiguration(Properties configuration)
IBatchManager
setConfiguration
in interface IBatchManager
Copyright © 2010–2016. All rights reserved.