Struct persist::indexed::AppliedState [−][src]
struct AppliedState {
saved_seqno: SeqNo,
highest_assigned_seqno: SeqNo,
id_mapping: Vec<StreamRegistration>,
graveyard: Vec<StreamRegistration>,
arrangements: BTreeMap<Id, Arrangement>,
}
Expand description
The cumulative state that results from applying some prefix of the persist state change log.
BlobMeta is the serialized version of exactly this state.
Fields
saved_seqno: SeqNo
highest_assigned_seqno: SeqNo
id_mapping: Vec<StreamRegistration>
graveyard: Vec<StreamRegistration>
arrangements: BTreeMap<Id, Arrangement>
Implementations
Construct a new BlobUnsealedBatch out of the provided updates
and add
it to the unsealed for id
.
The caller is responsible for updating META after they’ve finished updating unsealeds.
Atomically moves all writes in unsealed not in advance of the trace’s seal frontier into the trace and does any necessary resulting eviction work to remove unnecessary batches.
Returns the current “sealed” frontier for an id.
This frontier represents a contract of time such that all updates with a
time less than it have arrived. This frontier is advanced though the
seal
method. Once a time has been sealed for an id, it becomes an
error to later seal it at an time less than the sealed frontier. It is
also an error to write new data with a time less than the sealed frontier.
Apply a seal command to in-memory state if it is valid.
fn append_unsealed<B: Blob>(
&mut self,
id: Id,
batch: BlobUnsealedBatch,
blob: &mut BlobCache<B>
) -> Result<(), Error>
fn append_unsealed<B: Blob>(
&mut self,
id: Id,
batch: BlobUnsealedBatch,
blob: &mut BlobCache<B>
) -> Result<(), Error>
Appends the given batch
to the unsealed for id
, writing the data into
blob storage.
The caller is responsible for updating META after they’ve finished updating unsealeds.
fn do_snapshot<B: BlobRead>(
&self,
id: Id,
blob: &BlobCache<B>
) -> Result<ArrangementSnapshot, Error>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AppliedState
impl Send for AppliedState
impl Sync for AppliedState
impl Unpin for AppliedState
impl UnwindSafe for AppliedState
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more