pub struct QueueImpl<P, V>where
P: QueueState<V>,
V: InternalMessageValue,{ /* private fields */ }Trait Implementations§
Source§impl<P, V> Queue<V> for QueueImpl<P, V>
impl<P, V> Queue<V> for QueueImpl<P, V>
Source§fn iterator(
&self,
partition: QueuePartitionIdx,
ranges: &[QueueShardRange],
for_shard_id: ShardIdent,
) -> Result<Box<dyn StateIterator<V>>>
fn iterator( &self, partition: QueuePartitionIdx, ranges: &[QueueShardRange], for_shard_id: ShardIdent, ) -> Result<Box<dyn StateIterator<V>>>
Create iterator for specified shard and return it
Source§fn prepare_diff(
&self,
diff: QueueDiffWithMessages<V>,
block_id_short: BlockIdShort,
hash: &HashBytes,
statistics: DiffStatistics,
check_sequence: Option<DiffZone>,
) -> Result<Option<PendingQueueDiff>>
fn prepare_diff( &self, diff: QueueDiffWithMessages<V>, block_id_short: BlockIdShort, hash: &HashBytes, statistics: DiffStatistics, check_sequence: Option<DiffZone>, ) -> Result<Option<PendingQueueDiff>>
Prepare diff for applying to state. Returns transaction that should be committed later.
Returns None if diff is already applied (duplicate).
Source§fn apply_diff(
&self,
diff: QueueDiffWithMessages<V>,
block_id_short: BlockIdShort,
hash: &HashBytes,
statistics: DiffStatistics,
check_sequence: Option<DiffZone>,
) -> Result<()>
fn apply_diff( &self, diff: QueueDiffWithMessages<V>, block_id_short: BlockIdShort, hash: &HashBytes, statistics: DiffStatistics, check_sequence: Option<DiffZone>, ) -> Result<()>
Add messages to state from
diff.messages and store diff info (writes immediately)Source§fn commit_diff(
&self,
mc_top_blocks: &[TopBlockIdUpdated],
partitions: &FastHashSet<QueuePartitionIdx>,
) -> Result<()>
fn commit_diff( &self, mc_top_blocks: &[TopBlockIdUpdated], partitions: &FastHashSet<QueuePartitionIdx>, ) -> Result<()>
Commit diffs to the state and update GC
Source§fn clear_uncommitted_state(
&self,
partitions: &FastHashSet<QueuePartitionIdx>,
top_shards: &[ShardIdent],
) -> Result<()>
fn clear_uncommitted_state( &self, partitions: &FastHashSet<QueuePartitionIdx>, top_shards: &[ShardIdent], ) -> Result<()>
Remove all data in uncommitted zone
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 the given range by accounts
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_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 for the given block from committed and/or uncommitted zones
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
Source§fn is_diff_exists(&self, block_id_short: &BlockIdShort) -> Result<bool>
fn is_diff_exists(&self, block_id_short: &BlockIdShort) -> Result<bool>
Check if diff exists in state
Auto Trait Implementations§
impl<P, V> Freeze for QueueImpl<P, V>
impl<P, V> !RefUnwindSafe for QueueImpl<P, V>
impl<P, V> Send for QueueImpl<P, V>
impl<P, V> Sync for QueueImpl<P, V>
impl<P, V> Unpin for QueueImpl<P, V>where
V: Unpin,
impl<P, V> UnsafeUnpin for QueueImpl<P, V>
impl<P, V> !UnwindSafe for QueueImpl<P, V>
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