Interface JobEventStore

All Known Implementing Classes:
FileSystemJobEventStore

public interface JobEventStore
A store for recording the JobEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether the store is empty.
    Read a job event.
    void
    Start the store.
    void
    stop(boolean clearEventLogs)
    Stop the store.
    void
    writeEvent(JobEvent jobEvent, boolean cutBlock)
    Write a job event.
  • Method Details

    • 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
    • isEmpty

      boolean isEmpty() throws Exception
      Returns whether the store is empty.
      Returns:
      false if the store contains any job events, true otherwise.
      Throws:
      Exception