Struct raft_log_engine::RaftLogEngine [−][src]
Implementations
impl RaftLogEngine
[src]
pub fn new(config: RaftEngineConfig) -> Self
[src]
pub fn exists(path: &str) -> bool
[src]
If path is not an empty directory, we say db exists.
pub fn raft_groups(&self) -> Vec<u64>
[src]
pub fn first_index(&self, raft_id: u64) -> Option<u64>
[src]
pub fn last_index(&self, raft_id: u64) -> Option<u64>
[src]
Trait Implementations
impl Clone for RaftLogEngine
[src]
fn clone(&self) -> RaftLogEngine
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl RaftEngine for RaftLogEngine
[src]
type LogBatch = RaftLogBatch
fn log_batch(&self, _capacity: usize) -> Self::LogBatch
[src]
fn sync(&self) -> Result<()>
[src]
fn get_raft_state(&self, raft_group_id: u64) -> Result<Option<RaftLocalState>>
[src]
fn get_entry(&self, raft_group_id: u64, index: u64) -> Result<Option<Entry>>
[src]
fn fetch_entries_to(
&self,
raft_group_id: u64,
begin: u64,
end: u64,
max_size: Option<usize>,
to: &mut Vec<Entry>
) -> Result<usize>
[src]
&self,
raft_group_id: u64,
begin: u64,
end: u64,
max_size: Option<usize>,
to: &mut Vec<Entry>
) -> Result<usize>
fn consume(&self, batch: &mut Self::LogBatch, sync: bool) -> Result<usize>
[src]
fn consume_and_shrink(
&self,
batch: &mut Self::LogBatch,
sync: bool,
_: usize,
_: usize
) -> Result<usize>
[src]
&self,
batch: &mut Self::LogBatch,
sync: bool,
_: usize,
_: usize
) -> Result<usize>
fn clean(
&self,
raft_group_id: u64,
_: &RaftLocalState,
batch: &mut RaftLogBatch
) -> Result<()>
[src]
&self,
raft_group_id: u64,
_: &RaftLocalState,
batch: &mut RaftLogBatch
) -> Result<()>
fn append(&self, raft_group_id: u64, entries: Vec<Entry>) -> Result<usize>
[src]
fn put_raft_state(
&self,
raft_group_id: u64,
state: &RaftLocalState
) -> Result<()>
[src]
&self,
raft_group_id: u64,
state: &RaftLocalState
) -> Result<()>
fn gc(&self, raft_group_id: u64, _from: u64, to: u64) -> Result<usize>
[src]
fn purge_expired_files(&self) -> Result<Vec<u64>>
[src]
fn has_builtin_entry_cache(&self) -> bool
[src]
fn gc_entry_cache(&self, raft_group_id: u64, to: u64)
[src]
fn flush_stats(&self) -> Option<CacheStats>
[src]
Flush current cache stats.
fn stop(&self)
[src]
fn dump_stats(&self) -> Result<String>
[src]
pub fn flush_metrics(&self, _instance: &str)
[src]
pub fn reset_statistics(&self)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for RaftLogEngine
impl Send for RaftLogEngine
impl Sync for RaftLogEngine
impl Unpin for RaftLogEngine
impl !UnwindSafe for RaftLogEngine
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,