public class DBEventProcessorStateService extends Object
EventProcessors.| Constructor and Description |
|---|
DBEventProcessorStateService(MongoConnection mongoConnection,
MongoJackObjectMapperProvider mapper) |
| Modifier and Type | Method and Description |
|---|---|
int |
deleteByEventDefinitionId(String id)
Delete state objects for the given event definition ID.
|
com.google.common.collect.ImmutableSet<EventProcessorStateDto> |
findByEventDefinitionsAndMaxTimestamp(Set<String> eventDefinitionIds,
org.joda.time.DateTime maxTimestamp)
Returns a set of event processor state objects where the event definition ID matches one of the ones in the given
set of IDs and the maximum processed timestamp is greater or equals the given timestamp.
|
Optional<EventProcessorStateDto> |
setState(EventProcessorStateDto dto)
Creates a new or updates an existing event processor state record for the values in the given DTO.
|
Optional<EventProcessorStateDto> |
setState(String eventDefinitionId,
org.joda.time.DateTime minProcessedTimestamp,
org.joda.time.DateTime maxProcessedTimestamp)
Creates a new or updates an existing event processor state record for the given values.
|
@Inject public DBEventProcessorStateService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper)
public com.google.common.collect.ImmutableSet<EventProcessorStateDto> findByEventDefinitionsAndMaxTimestamp(Set<String> eventDefinitionIds, org.joda.time.DateTime maxTimestamp)
eventDefinitionIds - set of event definition IDsmaxTimestamp - the threshold for the maximum processed timestamppublic Optional<EventProcessorStateDto> setState(EventProcessorStateDto dto)
dto - state DTOpublic Optional<EventProcessorStateDto> setState(String eventDefinitionId, org.joda.time.DateTime minProcessedTimestamp, org.joda.time.DateTime maxProcessedTimestamp)
eventDefinitionId - the related event definition IDmaxProcessedTimestamp - the maximum processed timestamppublic int deleteByEventDefinitionId(String id)
id - the object ID to deleteCopyright © 2012–2021 Graylog, Inc.. All rights reserved.