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 ReplayMachine
s 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
ReplayMachine
s that can be constructed via machine_factory
.
Auto Trait Implementations§
impl<F> Freeze for DualPipesBuilder<F>
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
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