public interface EventStore
Modifier and Type | Method and Description |
---|---|
boolean |
add(Event event)
Adds an event to the event store.
|
void |
clear()
Removes all events in the event store.
|
boolean |
contains(Event event)
Indicates whether the event store contains the given event.
|
Timestamp |
earliestTimestamp()
Returns the earliest timestamp contained in this event store.
|
boolean |
isEmpty()
Indicates whether the event store is empty (i.e. contains no events).
|
boolean |
remove(Event event)
Removes an event from the event store.
|
int |
size()
Returns the number of events contained in the event store.
|
Set<Event> |
subsetAt(Timestamp timestamp)
Returns the subset of all events that occurred at the given timestamp.
|
SortedSet<Event> |
subsetSince(Timestamp timestamp)
Returns the subset of all events that occurred since the given timestamp.
|
SortedSet<Event> |
subsetUntil(Timestamp timestamp)
Returns the subset of all events that occurred until the given timestamp.
|
boolean contains(Event event)
true
if the store contains the event,
false
otherwise.boolean isEmpty()
true
if the store size is 0,
false
otherwise.int size()
void clear()
boolean add(Event event)
event
- the event to be added to the event storetrue
if the store did not already contain the
specified event, false
otherwiseboolean remove(Event event)
event
- the event to be removed from the event storetrue
if store contained the specified event,
false
otherwiseTimestamp earliestTimestamp()
Set<Event> subsetAt(Timestamp timestamp)
timestamp
- The time filter criterion. Only events at that exact timestamp
are to be contained in the subset.null
, unmodifiable subset of all events with a
timestamp equal to the given timestamp
argument.SortedSet<Event> subsetUntil(Timestamp timestamp)
timestamp
- The time filter criterion. Only events at that timestamp or
earlier are to be contained in the subset.null
, unmodifiable subset of all events with a
timestamp smaller than or equal to the given timestamp
argument.SortedSet<Event> subsetSince(Timestamp timestamp)
timestamp
- The time filter criterion. Only events at that timestamp or
later are to be contained in the subset.null
, unmodifiable subset of all events with a
timestamp greater than or equal to the given timestamp
argument.Copyright © Aimpulse Intelligent Systems GmbH
All rights reserved.