public interface EventStore
Modifier and Type | Method and Description |
---|---|
String |
getCurrentEventToken(List<Long> directoryIds)
Returns a token that can be used for querying events that have happened
after the token was generated.
|
Events |
getNewEvents(String eventToken,
Application application)
Returns an events object which contains a new eventToken and events that
happened after the given
eventToken was generated. |
Events |
getNewEvents(String eventToken,
List<Long> directoryIds)
Deprecated.
|
void |
handleApplicationEvent(Object event)
Notifies the store that an application event happened that might make it impossible to recreate the event
stream.
|
void |
storeOperationEvent(OperationEvent event)
Stores the given event.
|
String getCurrentEventToken(List<Long> directoryIds)
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.
directoryIds
- the ids of directories that the token should include events for@Deprecated Events getNewEvents(String eventToken, List<Long> directoryIds) 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(List)
again before asking for
new events.
eventToken
- event token that was retrieved by a call to
getCurrentEventToken(List)
or getNewEvents(String, List)
directoryIds
- the ids of directories to retrieve events foreventToken
was generated.EventTokenExpiredException
- if events that happened after the
event token was generated can not be retrievedEvents getNewEvents(String eventToken, Application application) 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(List)
again before asking for
new events.
eventToken
- event token that was retrieved by a call to
getCurrentEventToken(List)
or getNewEvents(String, List)
application
- the application to retrieve events foreventToken
was generated.EventTokenExpiredException
- if events that happened after the
event token was generated can not be retrievedvoid storeOperationEvent(OperationEvent event)
event
- event to be storedvoid handleApplicationEvent(Object event)
event
- the atlassian-events event triggering the actionCopyright © 2020 Atlassian. All rights reserved.