Interface JobEventStore
-
- All Known Implementing Classes:
FileSystemJobEventStore
public interface JobEventStoreA store for recording theJobEvent.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisEmpty()Returns whether the store is empty.JobEventreadEvent()Read a job event.voidstart()Start the store.voidstop(boolean clearEventLogs)Stop the store.voidwriteEvent(JobEvent jobEvent, boolean cutBlock)Write a job event.
-
-
-
Method Detail
-
start
void start() throws ExceptionStart the store. This method should be called before any other operations.- Throws:
Exception
-
stop
void stop(boolean clearEventLogs)
Stop the store.- Parameters:
clearEventLogs- Whether to clear the job events that have been recorded in the store.
-
writeEvent
void writeEvent(JobEvent jobEvent, boolean cutBlock)
Write a job event.- Parameters:
jobEvent- The job event that will be recorded.cutBlock- If set to true, the current output file will be closed after writing this event, and a new output file will be created for subsequent events. This parameter effectively controls the segmentation of event data into separate files.
-
readEvent
JobEvent readEvent() throws Exception
Read a job event.- Returns:
- job event.
- Throws:
Exception
-
-