Skip to main content

MessageQueueAdapterStdImpl

Struct MessageQueueAdapterStdImpl 

Source
pub struct MessageQueueAdapterStdImpl<V: InternalMessageValue> { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl<V: InternalMessageValue> MessageQueueAdapter<V> for MessageQueueAdapterStdImpl<V>

Source§

fn create_iterator( &self, for_shard_id: ShardIdent, partition: QueuePartitionIdx, ranges: Vec<QueueShardBoundedRange>, ) -> Result<Box<dyn QueueIterator<V>>>

Create iterator for specified shard and return it
Source§

fn get_statistics( &self, partitions: &FastHashSet<QueuePartitionIdx>, ranges: &[QueueShardBoundedRange], ) -> Result<QueueStatistics>

Returns statistics for the specified ranges by partition and source shards (equal to iterator ranges)
Source§

fn prepare_diff( &self, diff: QueueDiffWithMessages<V>, block_id_short: BlockIdShort, diff_hash: &HashBytes, statistics: DiffStatistics, check_sequence: Option<DiffZone>, ) -> Result<Option<PendingQueueDiff>>

Prepare diff for applying to queue. 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, diff_hash: &HashBytes, statistics: DiffStatistics, check_sequence: Option<DiffZone>, ) -> Result<()>

Apply diff by storing it to the queue uncommitted zone (waiting for the operation to complete)
Source§

fn commit_diff( &self, mc_top_blocks: Vec<TopBlockIdUpdated>, partitions: &FastHashSet<QueuePartitionIdx>, ) -> Result<()>

Commit previously applied diffs, updating commit pointers (waiting for the operation to complete)
Source§

fn clear_uncommitted_state(&self, top_shards: &[ShardIdent]) -> Result<()>

Source§

fn get_diff_info( &self, shard_ident: &ShardIdent, seqno: u32, zone: DiffZone, ) -> Result<Option<DiffInfo>>

Get diff for the given block from committed and/or uncommitted zone
Source§

fn is_diff_exists(&self, block_id_short: &BlockIdShort) -> Result<bool>

Check if diff exists in state
Source§

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

Get diffs tail len. from - start key for the tail. Diff with max_message == from will be excluded from the tail
Source§

fn load_separated_diff_statistics( &self, partitions: &FastHashSet<QueuePartitionIdx>, range: &QueueShardBoundedRange, ) -> Result<SeparatedStatisticsByPartitions>

Load separated diff statistics for the specified partitions and range. range.from = diff with max_message == range.from will be excluded in statistics; range.to = diff with max_message == range.to will be included in statistics
Source§

fn get_router_and_statistics( &self, block_id_short: &BlockIdShort, diff_info: DiffInfo, partition: QueuePartitionIdx, ) -> Result<(PartitionRouter, DiffStatistics)>

Get partition router and statistics for the specified block

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> SafeDelete for T
where T: 'static,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> EquivalentRepr<T> for T