@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.
|
CompletableFuture<Optional<EventStatus>> |
deleteEventStatus(EventStatus status)
Asynchronously delete from the store the given status.
|
Optional<Event> |
getEvent(String eventId)
Get the event matching the passed identifier.
|
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.
|
EventSearchResult |
search(EventQuery query)
Search for event according to condition provided by the
EventQuery . |
CompletableFuture<Event> saveEvent(Event event)
event
- the event to saveCompletableFuture
providing the added Event
CompletableFuture<EventStatus> saveEventStatus(EventStatus status)
status
- the status to saveCompletableFuture
providing the added EventStatus
CompletableFuture<Optional<Event>> deleteEvent(String eventId)
eventId
- the unique identifier of the eventCompletableFuture
providing the deleted Event
or empty if none could be foundCompletableFuture<Optional<Event>> deleteEvent(Event event)
event
- the event to remove from the storeCompletableFuture
providing the deleted Event
or empty if none could be foundCompletableFuture<Optional<EventStatus>> deleteEventStatus(EventStatus status)
status
- the status to deleteCompletableFuture
providing the deleted EventStatus
or empty if none could be
foundOptional<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 searchCopyright © 2004–2020 XWiki. All rights reserved.