Package org.graylog.events.processor
Class EventProcessorDependencyCheck
java.lang.Object
org.graylog.events.processor.EventProcessorDependencyCheck
This can be used by an event processor to check if required event definitions have already processed a specific
timerange.
-
Constructor Summary
ConstructorDescriptionEventProcessorDependencyCheck
(DBEventProcessorStateService stateService, DBProcessingStatusService processingStatusService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canProcessTimerange
(org.joda.time.DateTime maxTimestamp, Set<String> processorDependencies) Checks if the given event definitions have already processed events up to the given timestamp.boolean
hasMessagesIndexedUpTo
(TimeRange timeRange) Checks if messages up to the given timestamp are searchable in Elasticsearch.
-
Constructor Details
-
EventProcessorDependencyCheck
@Inject public EventProcessorDependencyCheck(DBEventProcessorStateService stateService, DBProcessingStatusService processingStatusService)
-
-
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 timestampprocessorDependencies
- set of event definition IDs- Returns:
- true if the given event definition IDs have processed events up to the given timestamp, false otherwise
-
hasMessagesIndexedUpTo
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 byProcessingStatusRecorder
.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
-