Struct openraft_rocksstore_compat07::TypeConfig
source · pub struct TypeConfig {}
Expand description
Declare the type configuration for MemStore
.
Trait Implementations§
source§impl Clone for TypeConfig
impl Clone for TypeConfig
source§fn clone(&self) -> TypeConfig
fn clone(&self) -> TypeConfig
Returns a copy 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 moresource§impl Debug for TypeConfig
impl Debug for TypeConfig
source§impl Default for TypeConfig
impl Default for TypeConfig
source§fn default() -> TypeConfig
fn default() -> TypeConfig
Returns the “default value” for a type. Read more
source§impl Ord for TypeConfig
impl Ord for TypeConfig
source§fn cmp(&self, other: &TypeConfig) -> Ordering
fn cmp(&self, other: &TypeConfig) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for TypeConfig
impl PartialEq for TypeConfig
source§fn eq(&self, other: &TypeConfig) -> bool
fn eq(&self, other: &TypeConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TypeConfig
impl PartialOrd for TypeConfig
source§fn partial_cmp(&self, other: &TypeConfig) -> Option<Ordering>
fn partial_cmp(&self, other: &TypeConfig) -> Option<Ordering>
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<TypeConfig> for Arc<RocksStore>
impl RaftLogReader<TypeConfig> for Arc<RocksStore>
source§fn get_log_state<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<LogState<TypeConfig>, 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<TypeConfig>, 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<TypeConfig>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>
fn try_get_log_entries<'life0, 'async_trait, RB>( &'life0 mut self, range: RB ) -> Pin<Box<dyn Future<Output = Result<Vec<Entry<TypeConfig>>, StorageError<RocksNodeId>>> + Send + 'async_trait>>
Get a series of log entries from storage. Read more
source§impl RaftSnapshotBuilder<TypeConfig> for Arc<RocksStore>
impl RaftSnapshotBuilder<TypeConfig> for Arc<RocksStore>
source§fn build_snapshot<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Snapshot<TypeConfig>, 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<TypeConfig>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Build snapshot Read more
source§impl RaftStorage<TypeConfig> for Arc<RocksStore>
impl RaftStorage<TypeConfig> for Arc<RocksStore>
§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, 'async_trait, I>(
&'life0 mut self,
entries: I
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
I: IntoIterator<Item = Entry<TypeConfig>> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn append_to_log<'life0, 'async_trait, I>(
&'life0 mut self,
entries: I
) -> Pin<Box<dyn Future<Output = Result<(), StorageError<RocksNodeId>>> + Send + 'async_trait>>where
I: IntoIterator<Item = Entry<TypeConfig>> + Send + 'async_trait,
Self: 'async_trait,
'life0: '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, EmptyNode>), 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, EmptyNode>), 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, 'async_trait>(
&'life0 mut self,
entries: &'life1 [Entry<TypeConfig>]
) -> Pin<Box<dyn Future<Output = Result<Vec<RocksResponse>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply_to_state_machine<'life0, 'life1, 'async_trait>(
&'life0 mut self,
entries: &'life1 [Entry<TypeConfig>]
) -> Pin<Box<dyn Future<Output = Result<Vec<RocksResponse>, StorageError<RocksNodeId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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<<TypeConfig as RaftTypeConfig>::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<<TypeConfig as RaftTypeConfig>::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, EmptyNode>,
snapshot: Box<<TypeConfig as RaftTypeConfig>::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, EmptyNode>,
snapshot: Box<<TypeConfig as RaftTypeConfig>::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<TypeConfig>>, 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<TypeConfig>>, 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 TypeConfig
impl RaftTypeConfig for TypeConfig
§type D = RocksRequest
type D = RocksRequest
Application-specific request data passed to the state machine.
§type R = RocksResponse
type R = RocksResponse
Application-specific response data returned by the state machine.
§type Entry = Entry<TypeConfig>
type Entry = Entry<TypeConfig>
Raft log entry, which can be built from an AppData.
impl Copy for TypeConfig
impl Eq for TypeConfig
impl StructuralPartialEq for TypeConfig
Auto Trait Implementations§
impl RefUnwindSafe for TypeConfig
impl Send for TypeConfig
impl Sync for TypeConfig
impl Unpin for TypeConfig
impl UnwindSafe for TypeConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.