public class JdbcBatchManager extends Object implements IBatchManager
REMOVE_OLD, REMOVE_SUCCESS
Constructor and Description |
---|
JdbcBatchManager() |
Modifier and Type | Method and Description |
---|---|
IBatch |
addBatch(String name,
String group,
String uuid)
Creates and adds a new Batch to the batch manager.
|
void |
batchEnd(Batch batch) |
protected List<IBatch> |
convertToIBatch(List<BdBatch> bdBaches) |
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 |
setBatchDao(BatchDao batchDao) |
void |
setConfiguration(Properties configuration)
Inject configuration for service manager.
|
public void setBatchDao(BatchDao batchDao)
public void batchEnd(Batch batch)
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 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 removeAllBatches(int scope)
removeAllBatches
in interface IBatchManager
scope
- 1 or IBatchManager.REMOVE_SUCCESS
IBatchManager.removeAllBatches(int)
public void removeBatch(String uuid)
IBatchManager
removeBatch
in interface IBatchManager
public void setConfiguration(Properties configuration)
IBatchManager
setConfiguration
in interface IBatchManager
public Properties getConfiguration()
IBatchManager
getConfiguration
in interface IBatchManager
public void init()
init
in interface IBatchManager
public List<IBatch> getBatches(String group, String name)
IBatchManager
getBatches
in interface IBatchManager
Copyright © 2010–2016. All rights reserved.