Interface EventDataSource
- All Known Implementing Classes:
JedisEventDataSource
public interface EventDataSource
Stores events in a stack. New events are pushed onto the stack. The size of the stack
is limited to N number of events. Events are returned in reverse order, i.e. latest
events are at the top of the list.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an event on top of the stackvoidDeletes all eventsReturns all events.Retrieves an event that was last seen by the uservoidsetLastEventSeen(Event event) Saves an event that was last seen by the uservoidtrimEventsAfter(long numberDesiredElements)
-
Method Details
-
addEvent
Adds an event on top of the stack- Parameters:
event-
-
getEvents
Returns all events. The events are sorted in chronologically reversed order.- Returns:
-
setLastEventSeen
Saves an event that was last seen by the user- Parameters:
event-
-
getLastEventSeen
Event getLastEventSeen()Retrieves an event that was last seen by the user- Returns:
-
deleteAllEvents
void deleteAllEvents()Deletes all events -
trimEventsAfter
void trimEventsAfter(long numberDesiredElements)
-