@Role
@Unstable
public interface EventStore
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Optional<Event>> |
deleteEvent(Event event)
Asynchronously deleted the event.
|
CompletableFuture<Optional<Event>> |
deleteEvent(String eventId)
Asynchronously deleted the event matching the passed identifier and all associated statuses.
|
CompletableFuture<Optional<EventStatus>> |
deleteEventStatus(EventStatus status)
Asynchronously delete from the store the given status.
|
CompletableFuture<Void> |
deleteEventStatuses(String entityId,
Date date)
Asynchronously delete from the store all the status associated with the passed entity and before the passed date.
|
CompletableFuture<Optional<EventStatus>> |
deleteMailEntityEvent(EntityEvent event)
Asynchronously delete from the store the given mail status.
|
Optional<Event> |
getEvent(String eventId)
Get the event matching the passed identifier.
|
CompletableFuture<Event> |
prefilterEvent(Event event)
Asynchronously update the event to indicate that it's been pre filtered.
|
CompletableFuture<Event> |
saveEvent(Event event)
Asynchronously save in the store the given event.
|
CompletableFuture<EventStatus> |
saveEventStatus(EventStatus status)
Asynchronously save in the storage the given status.
|
CompletableFuture<EventStatus> |
saveMailEntityEvent(EntityEvent event)
Asynchronously save in the storage the given mail status.
|
EventSearchResult |
search(EventQuery query)
Search for event according to condition provided by the
EventQuery . |
EventSearchResult |
search(EventQuery query,
Set<String> fields)
Search for event according to condition provided by the
EventQuery . |
CompletableFuture<Event> saveEvent(Event event)
event
- the event to saveCompletableFuture
providing the added Event
deleteEvent(Event)
CompletableFuture<EventStatus> saveEventStatus(EventStatus status)
status
- the status to saveCompletableFuture
providing the added EventStatus
deleteEventStatus(EventStatus)
CompletableFuture<EventStatus> saveMailEntityEvent(EntityEvent event)
event
- the status to saveCompletableFuture
providing the added EntityEvent
deleteMailEntityEvent(EntityEvent)
CompletableFuture<Optional<Event>> deleteEvent(String eventId)
eventId
- the unique identifier of the eventCompletableFuture
providing the deleted Event
or empty if none could be foundsaveEvent(Event)
CompletableFuture<Optional<Event>> deleteEvent(Event event)
event
- the event to remove from the storeCompletableFuture
providing the deleted Event
or empty if none could be foundsaveEvent(Event)
CompletableFuture<Optional<EventStatus>> deleteEventStatus(EventStatus status)
status
- the status to deleteCompletableFuture
providing the deleted EventStatus
or empty if none could be
foundsaveEventStatus(EventStatus)
CompletableFuture<Void> deleteEventStatuses(String entityId, Date date)
entityId
- the id of the entity for which to remove the statusesdate
- the date before which to remove the statusesCompletableFuture
providing the deleted EventStatus
or empty if none could be
foundCompletableFuture<Optional<EventStatus>> deleteMailEntityEvent(EntityEvent event)
event
- the status to deleteCompletableFuture
providing the deleted EntityEvent
or empty if none could be
foundsaveMailEntityEvent(EntityEvent)
CompletableFuture<Event> prefilterEvent(Event event)
event
- the event to updateCompletableFuture
providing the updated Event
Optional<Event> getEvent(String eventId) throws EventStreamException
eventId
- the unique identifier of the eventEventStreamException
- when failing to get the eventEventSearchResult search(EventQuery query) throws EventStreamException
EventQuery
.query
- the query containing the filtering conditionsEventStreamException
- when failing to execute the searchEventSearchResult search(EventQuery query, Set<String> fields) throws EventStreamException
EventQuery
.query
- the query containing the filtering conditionsfields
- the fields included in the result, null or empty means all fieldsEventStreamException
- when failing to execute the searchCopyright © 2004–2021 XWiki. All rights reserved.