Interface JobEventStore
-
- All Known Implementing Classes:
FileSystemJobEventStore
public interface JobEventStore
A store for recording theJobEvent
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isEmpty()
Returns whether the store is empty.JobEvent
readEvent()
Read a job event.void
start()
Start the store.void
stop(boolean clearEventLogs)
Stop the store.void
writeEvent(JobEvent jobEvent, boolean cutBlock)
Write a job event.
-
-
-
Method Detail
-
start
void start() throws Exception
Start 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
-
-