Struct openraft_rocksstore::Config
source · pub struct Config {}
Expand description
Declare the type configuration for MemStore
.
Trait Implementations§
source§impl Ord for Config
impl Ord for Config
source§impl PartialEq<Config> for Config
impl PartialEq<Config> for Config
source§impl PartialOrd<Config> for Config
impl PartialOrd<Config> for Config
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl RaftLogReader<Config> for Arc<RocksStore>
impl RaftLogReader<Config> for Arc<RocksStore>
source§fn get_log_state<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<LogState<Config>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_log_state<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<LogState<Config>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the last deleted log id and the last log id. Read more
source§fn try_get_log_entries<'life0, 'async_trait, RB>(
&'life0 mut self,
range: RB
) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<Config>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
RB: 'async_trait + RangeBounds<u64> + Clone + Debug + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
fn try_get_log_entries<'life0, 'async_trait, RB>( &'life0 mut self, range: RB ) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<Config>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where RB: 'async_trait + RangeBounds<u64> + Clone + Debug + Send + Sync, Self: 'async_trait, 'life0: 'async_trait,
Get a series of log entries from storage. Read more
source§impl RaftSnapshotBuilder<Config, Cursor<Vec<u8, Global>>> for Arc<RocksStore>
impl RaftSnapshotBuilder<Config, Cursor<Vec<u8, Global>>> for Arc<RocksStore>
source§fn build_snapshot<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Snapshot<RocksNodeId, BasicNode, Cursor<Vec<u8>>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn build_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Snapshot<RocksNodeId, BasicNode, Cursor<Vec<u8>>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Build snapshot Read more
source§impl RaftStorage<Config> for Arc<RocksStore>
impl RaftStorage<Config> for Arc<RocksStore>
§type SnapshotData = Cursor<Vec<u8, Global>>
type SnapshotData = Cursor<Vec<u8, Global>>
The storage engine’s associated type used for exposing a snapshot for reading & writing. Read more
§type LogReader = Arc<RocksStore>
type LogReader = Arc<RocksStore>
Log reader type.
§type SnapshotBuilder = Arc<RocksStore>
type SnapshotBuilder = Arc<RocksStore>
Snapshot builder type.
source§fn save_vote<'life0, 'life1, 'async_trait>(
&'life0 mut self,
vote: &'life1 Vote<RocksNodeId>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_vote<'life0, 'life1, 'async_trait>( &'life0 mut self, vote: &'life1 Vote<RocksNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
To ensure correctness: the vote must be persisted on disk before returning.
fn read_vote<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Option<Vote<RocksNodeId>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn append_to_log<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
entries: &'life1 [&'life2 Entry<Config>]
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_to_log<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, entries: &'life1 [&'life2 Entry<Config>] ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Append a payload of entries to the log. Read more
source§fn delete_conflict_logs_since<'life0, 'async_trait>(
&'life0 mut self,
log_id: LogId<RocksNodeId>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_conflict_logs_since<'life0, 'async_trait>( &'life0 mut self, log_id: LogId<RocksNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Delete conflict log entries since
log_id
, inclusive. Read moresource§fn purge_logs_upto<'life0, 'async_trait>(
&'life0 mut self,
log_id: LogId<RocksNodeId>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn purge_logs_upto<'life0, 'async_trait>( &'life0 mut self, log_id: LogId<RocksNodeId> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Delete applied log entries upto
log_id
, inclusive. Read moresource§fn last_applied_state<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(Option<LogId<RocksNodeId>>, StoredMembership<RocksNodeId, BasicNode>), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn last_applied_state<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<(Option<LogId<RocksNodeId>>, StoredMembership<RocksNodeId, BasicNode>), StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the last applied log id which is recorded in state machine, and the last applied
membership config. Read more
source§fn apply_to_state_machine<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
entries: &'life1 [&'life2 Entry<Config>]
) -> Pin<Box<dyn Future<Output = Result<Vec<RocksResponse>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn apply_to_state_machine<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, entries: &'life1 [&'life2 Entry<Config>] ) -> Pin<Box<dyn Future<Output = Result<Vec<RocksResponse>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Apply the given payload of entries to the state machine. Read more
source§fn begin_receiving_snapshot<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Box<Self::SnapshotData>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn begin_receiving_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Box<Self::SnapshotData>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Create a new blank snapshot, returning a writable handle to the snapshot object. Read more
source§fn install_snapshot<'life0, 'life1, 'async_trait>(
&'life0 mut self,
meta: &'life1 SnapshotMeta<RocksNodeId, BasicNode>,
snapshot: Box<Self::SnapshotData>
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn install_snapshot<'life0, 'life1, 'async_trait>( &'life0 mut self, meta: &'life1 SnapshotMeta<RocksNodeId, BasicNode>, snapshot: Box<Self::SnapshotData> ) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Install a snapshot which has finished streaming from the leader. Read more
source§fn get_current_snapshot<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<RocksNodeId, BasicNode, Self::SnapshotData>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_snapshot<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Option<Snapshot<RocksNodeId, BasicNode, Self::SnapshotData>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get a readable handle to the current snapshot, along with its metadata. Read more
source§fn get_log_reader<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Self::LogReader> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_log_reader<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Self::LogReader> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the log reader. Read more
source§fn get_snapshot_builder<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Self::SnapshotBuilder> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_snapshot_builder<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Self::SnapshotBuilder> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the snapshot builder for the state machine. Read more
source§impl RaftTypeConfig for Config
impl RaftTypeConfig for Config
impl Copy for Config
impl Eq for Config
impl StructuralEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.