public interface EventStore
| Modifier and Type | Method and Description |
|---|---|
String |
getCurrentEventToken()
Returns a token that can be used for querying events that have happened
after the token was generated.
|
Events |
getNewEvents(String eventToken)
Returns an events object which contains a new eventToken and events that
happened after the given
eventToken was generated. |
void |
invalidateEvents()
Removes all events from the EventStore,
with no associated reason for the invalidation
|
void |
invalidateEvents(Class unsupportedEventSource)
Removes all events from the EventStore,
due to Crowd not supporting the specified event type.
|
void |
invalidateEvents(String reason)
Removes all events from the EventStore for the specified reason.
|
void |
storeEvent(OperationEvent event)
Stores the given event.
|
String getCurrentEventToken()
If the event token has not changed since the last call to this method, it is guaranteed that no new events have been received.
The format of event token is implementation specific and can change without a warning.
Events getNewEvents(String eventToken) throws EventTokenExpiredException
eventToken was generated.
If for any reason event store is unable to retrieve events that happened
after the event token was generated, an
EventTokenExpiredException will be thrown. The caller is then
expected to call getCurrentEventToken() again before asking for
new events.
eventToken - event token that was retrieved by a call to
getCurrentEventToken() or getNewEvents(String)eventToken was generated.EventTokenExpiredException - if events that happened after the
event token was generated can not be retrievedvoid storeEvent(OperationEvent event)
event - event to be storedvoid invalidateEvents()
void invalidateEvents(Class unsupportedEventSource)
unsupportedEventSource - is used as the reason for the invalidation for logging purposes.void invalidateEvents(String reason)
reason - is used for logging purposes.Copyright © 2017 Atlassian. All rights reserved.