Struct raft_engine::internals::FilePipeLogBuilder
source · pub struct FilePipeLogBuilder<F: FileSystem> { /* private fields */ }Expand description
DualPipes factory that can also recover other customized memory states.
Implementations§
source§impl<F: FileSystem> DualPipesBuilder<F>
impl<F: FileSystem> DualPipesBuilder<F>
sourcepub fn new(
cfg: Config,
file_system: Arc<F>,
listeners: Vec<Arc<dyn EventListener>>
) -> Self
pub fn new( cfg: Config, file_system: Arc<F>, listeners: Vec<Arc<dyn EventListener>> ) -> Self
Creates a new builder.
sourcepub fn scan(&mut self) -> Result<()>
pub fn scan(&mut self) -> Result<()>
Scans for all log files under the working directory. The directory will be created if not exists.
sourcepub fn recover<M: ReplayMachine, FA: Factory<M>>(
&mut self,
machine_factory: &FA
) -> Result<(M, M)>
pub fn recover<M: ReplayMachine, FA: Factory<M>>( &mut self, machine_factory: &FA ) -> Result<(M, M)>
Reads through log items in all available log files, and replays them to
specific ReplayMachines that can be constructed via
machine_factory.
sourcepub fn recover_queue<M: ReplayMachine, FA: Factory<M>>(
&mut self,
file_system: Arc<F>,
recovery_cfg: RecoveryConfig,
replay_machine_factory: &FA
) -> Result<M>
pub fn recover_queue<M: ReplayMachine, FA: Factory<M>>( &mut self, file_system: Arc<F>, recovery_cfg: RecoveryConfig, replay_machine_factory: &FA ) -> Result<M>
Manually reads through log items in all available log files of the
specified [LogQueue], and replays them to specific
ReplayMachines that can be constructed via machine_factory.
Auto Trait Implementations§
impl<F> !RefUnwindSafe for DualPipesBuilder<F>
impl<F> Send for DualPipesBuilder<F>
impl<F> Sync for DualPipesBuilder<F>
impl<F> Unpin for DualPipesBuilder<F>
impl<F> !UnwindSafe for DualPipesBuilder<F>
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