|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mybatchfwk.history.FileExecutionHistory
public class FileExecutionHistory
An history storage that store the id of the executed tasks into two files, one for the completed tasks, one another for the failed tasks.
| Field Summary | |
|---|---|
static java.lang.String |
COMPLETED_TASKS_FILENAME
|
static java.lang.String |
FAILED_TASKS_FILENAME
|
static java.lang.String |
PROPERTY_STORAGE_FOLDER
|
| Constructor Summary | |
|---|---|
FileExecutionHistory()
|
|
| Method Summary | |
|---|---|
protected void |
closeIndexer(KeysFileIndexer indexer)
Close an indexer if it exists. |
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 |
protected void |
rotateFile(java.io.File file,
java.io.File oldFile)
|
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 |
|---|
public static final java.lang.String PROPERTY_STORAGE_FOLDER
public static final java.lang.String COMPLETED_TASKS_FILENAME
public static final java.lang.String FAILED_TASKS_FILENAME
| Constructor Detail |
|---|
public FileExecutionHistory()
| Method Detail |
|---|
public void initStorage(BatchConfiguration configuration)
throws BatchException
IExecutionHistory
initStorage in interface IExecutionHistoryconfiguration - the configuration of the batch
BatchException
protected void rotateFile(java.io.File file,
java.io.File oldFile)
throws BatchException
file - oldFile -
BatchExceptionprotected void closeIndexer(KeysFileIndexer indexer)
indexer -
public void closeStorage()
throws BatchException
IExecutionHistory
closeStorage 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
public java.util.Iterator completedTasksIdIterator()
throws BatchException
IExecutionHistory
completedTasksIdIterator in interface IExecutionHistoryBatchException
public java.util.Iterator failedTasksIdIterator()
throws BatchException
IExecutionHistory
failedTasksIdIterator in interface IExecutionHistoryBatchException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||