public final class DefaultEventStore extends MessageStorage<io.spine.core.EventId,io.spine.core.Event> implements EventStore, io.spine.logging.Logging
EventStore
.Constructor and Description |
---|
DefaultEventStore(ContextSpec context,
StorageFactory factory)
Constructs new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
append(io.spine.core.Event event)
Appends the passed event to the history of events.
|
void |
appendAll(java.lang.Iterable<io.spine.core.Event> events)
Appends the passed events to the history of events.
|
void |
read(io.spine.server.event.EventStreamQuery request,
io.grpc.stub.StreamObserver<io.spine.core.Event> responseObserver)
Creates the stream with events matching the passed query.
|
write, write, writeBatch
close, delete, deleteAll, deleteRecord, index, index, isMultitenant, isOpen, queryForAll, read, read, readAll, readAll, readAll, readAll, readAllRecords, toQuery, toQuery, toQuery, toQuery, write, writeAll, writeRecord
queryBuilder
checkNotClosed, checkNotClosed, isClosed
public DefaultEventStore(ContextSpec context, StorageFactory factory)
public void append(io.spine.core.Event event)
EventStore
append
in interface EventStore
event
- the record to appendpublic void appendAll(java.lang.Iterable<io.spine.core.Event> events)
EventStore
If the passed Iterable
is empty, no action is performed.
If the passed Events belong to the different
tenants, an IllegalArgumentException
is thrown.
appendAll
in interface EventStore
events
- the events to appendpublic void read(io.spine.server.event.EventStreamQuery request, io.grpc.stub.StreamObserver<io.spine.core.Event> responseObserver)
EventStore
read
in interface EventStore
request
- the query with filtering parameters for the event historyresponseObserver
- observer for the resulting stream