pub struct CheckpointConfig {
pub force: bool,
pub k_bytes: u32,
pub minutes: u32,
pub minimize_recovery_time: bool,
}Expand description
Specifies the attributes of a checkpoint operation invoked via
Environment::checkpoint.
§Defaults
All thresholds default to 0 (disabled) and force = false. If all
thresholds are 0 and force = false, calling checkpoint() still runs
a checkpoint subject to normal dirty-node conditions.
Fields§
§force: boolIf true, force a checkpoint regardless of whether thresholds have
been exceeded. Equivalent toCheckpointConfig.setForce(true).
k_bytes: u32Run a checkpoint if more than this many kibibytes of log data have
been written since the last checkpoint. 0 means disabled.
minutes: u32Run a checkpoint if more than this many minutes have elapsed since
the last checkpoint. 0 means disabled.
minimize_recovery_time: boolIf true, perform a full checkpoint that minimises future recovery
time (writes all dirty nodes, not just the minimum required).
Implementations§
Source§impl CheckpointConfig
impl CheckpointConfig
Sourcepub fn with_force(self, force: bool) -> Self
pub fn with_force(self, force: bool) -> Self
Builder: set force.
Sourcepub fn with_k_bytes(self, k_bytes: u32) -> Self
pub fn with_k_bytes(self, k_bytes: u32) -> Self
Builder: set k_bytes threshold.
Sourcepub fn with_minutes(self, minutes: u32) -> Self
pub fn with_minutes(self, minutes: u32) -> Self
Builder: set minutes threshold.
Sourcepub fn with_minimize_recovery_time(self, minimize: bool) -> Self
pub fn with_minimize_recovery_time(self, minimize: bool) -> Self
Builder: set minimize_recovery_time.
Trait Implementations§
Source§impl Clone for CheckpointConfig
impl Clone for CheckpointConfig
Source§fn clone(&self) -> CheckpointConfig
fn clone(&self) -> CheckpointConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more