public class AggregateEventStorage extends MessageStorage<io.spine.server.aggregate.AggregateEventRecordId,io.spine.server.aggregate.AggregateEventRecord>
Aggregate
.AggregateStorage
Constructor and Description |
---|
AggregateEventStorage(ContextSpec context,
StorageFactory factory)
Creates a new storage.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
delete(io.spine.server.aggregate.AggregateEventRecordId id)
Physically deletes the message record from the storage by the record identifier.
|
protected void |
deleteAll(java.lang.Iterable<io.spine.server.aggregate.AggregateEventRecordId> ids)
Deletes the batch of message records by their identifiers.
|
protected java.util.Iterator<io.spine.server.aggregate.AggregateEventRecord> |
readAll(io.spine.query.RecordQuery<io.spine.server.aggregate.AggregateEventRecordId,io.spine.server.aggregate.AggregateEventRecord> query)
Reads all message records according to the passed query.
|
write, write, writeBatch
close, deleteRecord, index, index, isMultitenant, isOpen, queryForAll, read, read, readAll, readAll, readAll, readAllRecords, toQuery, toQuery, toQuery, toQuery, write, writeAll, writeRecord
queryBuilder
checkNotClosed, checkNotClosed, isClosed
public AggregateEventStorage(ContextSpec context, StorageFactory factory)
Uses the passed factory to create a RecordStorage
delegate, and configures it with
the columns stored for the AggregateEventRecord
.
context
- specification of the Bounded Context in scope of which the storage will be usedfactory
- the storage factory to use when creating a record storage delegateprotected java.util.Iterator<io.spine.server.aggregate.AggregateEventRecord> readAll(io.spine.query.RecordQuery<io.spine.server.aggregate.AggregateEventRecordId,io.spine.server.aggregate.AggregateEventRecord> query)
The default ResponseFormat
is used.
Overrides to expose this method as a part of storage's package-level API.
readAll
in class RecordStorageDelegate<io.spine.server.aggregate.AggregateEventRecordId,io.spine.server.aggregate.AggregateEventRecord>
query
- the query to executeprotected boolean delete(io.spine.server.aggregate.AggregateEventRecordId id)
In case the record with the specified identifier is not found in the storage,
this method does nothing and returns false
.
Overrides to expose this method as a part of storage's package-level API.
delete
in class RecordStorageDelegate<io.spine.server.aggregate.AggregateEventRecordId,io.spine.server.aggregate.AggregateEventRecord>
id
- identifier of the record to deletetrue
if the record was deleted,
or false
if the record with the specified identifier was not foundprotected void deleteAll(java.lang.Iterable<io.spine.server.aggregate.AggregateEventRecordId> ids)
If for some provided identifiers there is no records in the storage, such identifiers are silently skipped.
Overrides to expose this method as a part of storage's package-level API.
deleteAll
in class RecordStorageDelegate<io.spine.server.aggregate.AggregateEventRecordId,io.spine.server.aggregate.AggregateEventRecord>
ids
- identifiers of the records to delete