pub trait Checkpointer: LockedProcessor {
// Required methods
fn checkpoint_set(&mut self) -> &mut dyn CheckpointSet;
fn start_collection(&mut self);
fn finish_collection(&mut self) -> Result<()>;
}
Available on crate feature
metrics
only.Expand description
The interface used by a Controller
to coordinate the Processor
with
Accumulator
(s) and Exporter
(s). The start_collection
and
finish_collection
methods start and finish a collection interval.
Controller
s call the Accumulator
(s) during collection to process
Accumulation
s.
Required Methods§
Sourcefn checkpoint_set(&mut self) -> &mut dyn CheckpointSet
fn checkpoint_set(&mut self) -> &mut dyn CheckpointSet
A checkpoint of the current data set. This may be called before and after collection. The implementation is required to return the same value throughout its lifetime.
Sourcefn start_collection(&mut self)
fn start_collection(&mut self)
Logic to be run at the start of a collection interval.
Sourcefn finish_collection(&mut self) -> Result<()>
fn finish_collection(&mut self) -> Result<()>
Cleanup logic or other behavior that needs to be run after a collection interval is complete.