I
- the type of stream projection IDspublic final class InMemoryProjectionStorage<I> extends ProjectionStorage<I>
ProjectionStorage
.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the storage.
|
boolean |
delete(I id)
Deletes the record with the passed ID.
|
java.util.Iterator<I> |
index()
Returns an iterator over identifiers of records in the storage.
|
protected java.util.Iterator<io.spine.server.entity.EntityRecord> |
readAllRecords(io.spine.client.ResponseFormat format)
Obtains an iterator for reading all records.
|
protected java.util.Iterator<io.spine.server.entity.EntityRecord> |
readMultipleRecords(java.lang.Iterable<I> ids,
com.google.protobuf.FieldMask fieldMask)
Obtains an iterator for reading multiple records by IDs, and
applying the passed field mask to the results.
|
RecordStorage<I> |
recordStorage()
Returns an entity storage implementation.
|
readAllRecords, readRecord, writeRecord, writeRecords
columnList, read, read, readAll, readAll, readAll, readLifecycleFlags, readMultiple, write, write, write, writeLifecycleFlags
checkNotClosed, checkNotClosed, isClosed, isMultitenant, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isMultitenant, isOpen
public java.util.Iterator<I> index()
Storage
public RecordStorage<I> recordStorage()
ProjectionStorage
recordStorage
in class ProjectionStorage<I>
public void close()
AbstractStorage
close
in interface Storage<I,io.spine.server.entity.EntityRecord,RecordReadRequest<I>>
close
in interface java.lang.AutoCloseable
close
in class AbstractStorage<I,io.spine.server.entity.EntityRecord,RecordReadRequest<I>>
public boolean delete(I id)
RecordStorage
delete
in class RecordStorage<I>
id
- the record to deletetrue
if the operation succeeded, false
otherwiseprotected java.util.Iterator<io.spine.server.entity.EntityRecord> readMultipleRecords(java.lang.Iterable<I> ids, com.google.protobuf.FieldMask fieldMask)
RecordStorage
The size of the returned Iterator
matches the size of the given ids
,
with nulls in place of missing or inactive entities.
readMultipleRecords
in class RecordStorage<I>
BulkStorageOperationsMixin.readMultiple(java.lang.Iterable<I>, com.google.protobuf.FieldMask)
protected java.util.Iterator<io.spine.server.entity.EntityRecord> readAllRecords(io.spine.client.ResponseFormat format)
RecordStorage
Only active entities are returned.
readAllRecords
in class RecordStorage<I>
format
- the expected format of the query responseBulkStorageOperationsMixin.readAll(io.spine.client.ResponseFormat)