|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mybatchfwk.history.MemoryExecutionHistory
public class MemoryExecutionHistory
This implementation store the ids into the memory.
Warning:
- the number of ids stored must be very limited, in order to prevents OutOfMemoryError.
- there is no persistence, so the ids are lost when the batch is stopped.
| Field Summary | |
|---|---|
protected java.util.List<java.lang.String> |
completedTasksList
|
protected java.util.List<java.lang.String> |
failedTasksList
|
| Constructor Summary | |
|---|---|
MemoryExecutionHistory()
|
|
| Method Summary | |
|---|---|
void |
closeStorage()
Close the storage system (called one time at the end of the batch) |
java.util.Iterator |
completedTasksIdIterator()
Return an iterator over the id of the completed tasks |
java.util.Iterator |
failedTasksIdIterator()
Return an iterator over the id of the completed tasks |
void |
initStorage(BatchConfiguration configuration)
Init the storage system (called one time at the beginning of the batch) |
boolean |
isCompletedTask(java.lang.String id)
Return true is this task has already been executed and completed |
boolean |
isFailedTask(java.lang.String id)
Return true is this task has already been executed but failed |
void |
storeCompletedTaskId(java.lang.String id)
Store the id of the completed task |
void |
storeFailedTaskId(java.lang.String id)
Store the id of the failed task |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<java.lang.String> completedTasksList
protected java.util.List<java.lang.String> failedTasksList
| Constructor Detail |
|---|
public MemoryExecutionHistory()
| Method Detail |
|---|
public void initStorage(BatchConfiguration configuration)
throws BatchException
IExecutionHistory
initStorage in interface IExecutionHistoryconfiguration - the configuration of the batch
BatchException
public void closeStorage()
throws BatchException
IExecutionHistory
closeStorage in interface IExecutionHistoryBatchException
public java.util.Iterator completedTasksIdIterator()
throws BatchException
IExecutionHistory
completedTasksIdIterator in interface IExecutionHistoryBatchException
public java.util.Iterator failedTasksIdIterator()
throws BatchException
IExecutionHistory
failedTasksIdIterator in interface IExecutionHistoryBatchException
public boolean isCompletedTask(java.lang.String id)
throws BatchException
IExecutionHistory
isCompletedTask in interface IExecutionHistoryid - the id a a task
BatchException
public boolean isFailedTask(java.lang.String id)
throws BatchException
IExecutionHistory
isFailedTask in interface IExecutionHistoryBatchException
public void storeCompletedTaskId(java.lang.String id)
throws BatchException
IExecutionHistory
storeCompletedTaskId in interface IExecutionHistoryBatchException
public void storeFailedTaskId(java.lang.String id)
throws BatchException
IExecutionHistory
storeFailedTaskId in interface IExecutionHistoryBatchException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||