pub struct ShardedStateEngine<M>where
M: MetadataStore + 'static,{ /* private fields */ }Implementations§
Source§impl<M> ShardedStateEngine<M>where
M: MetadataStore + 'static,
impl<M> ShardedStateEngine<M>where
M: MetadataStore + 'static,
pub fn new(shards: Vec<Arc<dyn StateShard>>, _metadata: Arc<M>) -> Self
pub fn with_thread_pool( shards: Vec<Arc<dyn StateShard>>, _metadata: Arc<M>, thread_pool: Option<Arc<ThreadPool>>, ) -> Self
pub fn shard_count(&self) -> usize
pub fn apply_replayed_block( &self, block_height: BlockId, operations: &[Operation], undo: &BlockUndo, ) -> StoreResult<()>
Trait Implementations§
Source§impl<M> StateEngine for ShardedStateEngine<M>where
M: MetadataStore + 'static,
impl<M> StateEngine for ShardedStateEngine<M>where
M: MetadataStore + 'static,
fn total_keys(&self) -> usize
fn prepare_journal( &self, block_height: BlockId, ops: &[Operation], ) -> StoreResult<BlockDelta>
fn commit( &self, block_height: BlockId, delta: BlockDelta, ) -> StoreResult<(StateStats, BlockUndo)>
fn revert(&self, block_height: BlockId, undo: BlockUndo) -> StoreResult<()>
fn lookup_many(&self, keys: &[Key]) -> Vec<Option<ValueBuf>>
fn lookup(&self, key: &Key) -> Option<ValueBuf>
fn snapshot_shards(&self) -> Vec<Arc<dyn StateShard>>
Auto Trait Implementations§
impl<M> Freeze for ShardedStateEngine<M>
impl<M> !RefUnwindSafe for ShardedStateEngine<M>
impl<M> Send for ShardedStateEngine<M>
impl<M> Sync for ShardedStateEngine<M>
impl<M> Unpin for ShardedStateEngine<M>
impl<M> !UnwindSafe for ShardedStateEngine<M>
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