pub struct PersistentStateStorage { /* private fields */ }Implementations§
Source§impl PersistentStateStorage
impl PersistentStateStorage
pub fn new( cells_db: CellsDb, files_dir: &Dir, node_state: Arc<NodeStateStorage>, block_handle_storage: Arc<BlockHandleStorage>, block_storage: Arc<BlockStorage>, shard_state_storage: Arc<ShardStateStorage>, ) -> Result<Self>
pub fn load_oldest_known_handle(&self) -> Option<BlockHandle>
pub fn oldest_known_handle_changed(&self) -> Notified<'_>
pub async fn preload(&self) -> Result<()>
pub fn state_chunk_size(&self) -> NonZeroU32
pub fn subscribe(&self) -> (Vec<PersistentState>, PersistentStateReceiver)
pub fn state_exists( &self, block_id: &BlockId, kind: PersistentStateKind, ) -> bool
pub fn get_state_info( &self, block_id: &BlockId, kind: PersistentStateKind, ) -> Option<PersistentStateInfo>
pub async fn read_state_part( &self, block_id: &BlockId, offset: u64, state_kind: PersistentStateKind, ) -> Option<Vec<u8>>
pub async fn store_shard_state( &self, mc_seqno: u32, handle: &BlockHandle, tracker_handle: RefMcStateHandle, ) -> Result<()>
pub async fn store_shard_state_file( &self, mc_seqno: u32, handle: &BlockHandle, file: File, ) -> Result<()>
pub async fn store_queue_state( &self, mc_seqno: u32, handle: &BlockHandle, block: BlockStuff, ) -> Result<()>
pub async fn store_queue_state_file( &self, mc_seqno: u32, handle: &BlockHandle, file: File, ) -> Result<()>
pub async fn rotate_persistent_states( &self, top_handle: &BlockHandle, ) -> Result<()>
Trait Implementations§
Source§impl Clone for PersistentStateStorage
impl Clone for PersistentStateStorage
Source§fn clone(&self) -> PersistentStateStorage
fn clone(&self) -> PersistentStateStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PersistentStateStorage
impl !RefUnwindSafe for PersistentStateStorage
impl Send for PersistentStateStorage
impl Sync for PersistentStateStorage
impl Unpin for PersistentStateStorage
impl !UnwindSafe for PersistentStateStorage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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