pub struct QueueStateStdImpl { /* private fields */ }Trait Implementations§
Source§impl<V: InternalMessageValue> QueueState<V> for QueueStateStdImpl
impl<V: InternalMessageValue> QueueState<V> for QueueStateStdImpl
Source§fn snapshot(&self) -> InternalQueueSnapshot
fn snapshot(&self) -> InternalQueueSnapshot
Create snapshot
Source§fn iterator(
&self,
snapshot: &InternalQueueSnapshot,
receiver: ShardIdent,
partition: QueuePartitionIdx,
ranges: &[QueueShardRange],
) -> Result<Box<dyn StateIterator<V>>>
fn iterator( &self, snapshot: &InternalQueueSnapshot, receiver: ShardIdent, partition: QueuePartitionIdx, ranges: &[QueueShardRange], ) -> Result<Box<dyn StateIterator<V>>>
Create iterator for given partition and ranges
Source§fn delete(
&self,
partition: QueuePartitionIdx,
ranges: &[QueueShardRange],
) -> Result<()>
fn delete( &self, partition: QueuePartitionIdx, ranges: &[QueueShardRange], ) -> Result<()>
Delete messages in given partition and ranges
Source§fn commit(
&self,
commit_pointers: FastHashMap<ShardIdent, (QueueKey, u32)>,
mc_block_id: &BlockId,
) -> Result<()>
fn commit( &self, commit_pointers: FastHashMap<ShardIdent, (QueueKey, u32)>, mc_block_id: &BlockId, ) -> Result<()>
Set commit pointers and last committed mc block id.
ATTENTION! Overrides old value without checks. Should validate the new value in the calling code.
Source§fn load_diff_statistics(
&self,
partition: QueuePartitionIdx,
range: &QueueShardRange,
result: &mut AccountStatistics,
) -> Result<()>
fn load_diff_statistics( &self, partition: QueuePartitionIdx, range: &QueueShardRange, result: &mut AccountStatistics, ) -> Result<()>
Load statistics for given partition and ranges
Source§fn load_separated_diff_statistics(
&self,
partitions: &FastHashSet<QueuePartitionIdx>,
range: &QueueShardRange,
) -> Result<SeparatedStatisticsByPartitions>
fn load_separated_diff_statistics( &self, partitions: &FastHashSet<QueuePartitionIdx>, range: &QueueShardRange, ) -> Result<SeparatedStatisticsByPartitions>
Load separated diff statistics for the specified partitions and range
Source§fn get_last_committed_mc_block_id(&self) -> Result<Option<BlockId>>
fn get_last_committed_mc_block_id(&self) -> Result<Option<BlockId>>
Get mc block id on which the queue was committed.
Returns None if queue was not committed
Source§fn get_diffs_tail_len(&self, shard_ident: &ShardIdent, from: &QueueKey) -> u32
fn get_diffs_tail_len(&self, shard_ident: &ShardIdent, from: &QueueKey) -> u32
Get diffs tail len from uncommitted state and committed state
Source§fn get_diff_info(
&self,
shard_ident: &ShardIdent,
seqno: u32,
zone: DiffZone,
) -> Result<Option<DiffInfo>>
fn get_diff_info( &self, shard_ident: &ShardIdent, seqno: u32, zone: DiffZone, ) -> Result<Option<DiffInfo>>
Get diff info by diff seqno
Source§fn get_last_applied_seqno(
&self,
shard_ident: &ShardIdent,
) -> Result<Option<u32>>
fn get_last_applied_seqno( &self, shard_ident: &ShardIdent, ) -> Result<Option<u32>>
Get last applied block seqno by shard ident from committed and uncommited zone
Source§fn get_commit_pointers(
&self,
) -> Result<FastHashMap<ShardIdent, CommitPointerValue>>
fn get_commit_pointers( &self, ) -> Result<FastHashMap<ShardIdent, CommitPointerValue>>
Get commit pointers
Source§fn prepare_diff(
&self,
block_id_short: &BlockIdShort,
statistics: &DiffStatistics,
hash: HashBytes,
diff: QueueDiffWithMessages<V>,
) -> Result<InternalQueueTransaction>
fn prepare_diff( &self, block_id_short: &BlockIdShort, statistics: &DiffStatistics, hash: HashBytes, diff: QueueDiffWithMessages<V>, ) -> Result<InternalQueueTransaction>
Prepare diff for writing to storage. Returns transaction that should be committed later.
fn clear_uncommitted( &self, partitions: &FastHashSet<QueuePartitionIdx>, top_shards: &[ShardIdent], ) -> Result<()>
Source§fn write_diff(
&self,
block_id_short: &BlockIdShort,
statistics: &DiffStatistics,
hash: HashBytes,
diff: QueueDiffWithMessages<V>,
) -> Result<()>
fn write_diff( &self, block_id_short: &BlockIdShort, statistics: &DiffStatistics, hash: HashBytes, diff: QueueDiffWithMessages<V>, ) -> Result<()>
Write diff to storage immediately.
Auto Trait Implementations§
impl Freeze for QueueStateStdImpl
impl RefUnwindSafe for QueueStateStdImpl
impl Send for QueueStateStdImpl
impl Sync for QueueStateStdImpl
impl Unpin for QueueStateStdImpl
impl UnsafeUnpin for QueueStateStdImpl
impl UnwindSafe for QueueStateStdImpl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more