Execution history

MyBatchFramework own an history mechanism. This allows to:

  • store the ids of the completed and failed tasks after execution. Next, these ids are available through the execution report. So, they can be used in order to display more informations about the batch execution.
  • filter the tasks given to the tasks executor, depending to the informations available into the history. So the user can choose to execute only the new and/or completed and/or failed tasks.

MyBatchFramework provides two implementations of this mechanism :

  • MemoryExecutionHistory: this implementation store the ids into the memory.
    The number of ids stored must be very limited, in order to prevents OutOfMemoryError. Moreover there is no persistence, so the ids are lost when the batch is stopped.
  • FileExecutionHistory: this implementation store the ids into files: mbf-completedTasks.txt and mbf-failedTasks.txt. This files are stored into the folder corresponding to the configuration parameter 'mbs.historyStorage.storageFolder'. Each file contains ids, one id per line. An fast indexing mechanism allow to retrieve this ids. If this files are already present into the folder at the execution of a batch, when they are renamed to mbf-completedTasks.txt.old and mbf-failedTasks.txt.old respectively.

The user can provides his own history mechanism, by storing the ids into a database by example.