Class EventProcessorDependencyCheck

java.lang.Object
org.graylog.events.processor.EventProcessorDependencyCheck

public class EventProcessorDependencyCheck extends Object
This can be used by an event processor to check if required event definitions have already processed a specific timerange.
  • Constructor Details

  • Method Details

    • canProcessTimerange

      public boolean canProcessTimerange(org.joda.time.DateTime maxTimestamp, Set<String> processorDependencies)
      Checks if the given event definitions have already processed events up to the given timestamp.
      Parameters:
      maxTimestamp - the max timestamp
      processorDependencies - set of event definition IDs
      Returns:
      true if the given event definition IDs have processed events up to the given timestamp, false otherwise
    • hasMessagesIndexedUpTo

      public boolean hasMessagesIndexedUpTo(TimeRange timeRange)
      Checks if messages up to the given timestamp are searchable in Elasticsearch. It looks at the latest receive timestamp that has been indexed by looking at the processing status maintained by ProcessingStatusRecorder.

      Caveat: This only looks at the processing status and doesn't take the Elasticsearch index.refresh_interval into account!

      Parameters:
      timeRange - the timestamp to check
      Returns:
      true if messages up to the given timeRange have already been indexed, false otherwise