Trait Checkpointer

Source
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. Controllers call the Accumulator(s) during collection to process Accumulations.

Required Methods§

Source

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.

Source

fn start_collection(&mut self)

Logic to be run at the start of a collection interval.

Source

fn finish_collection(&mut self) -> Result<()>

Cleanup logic or other behavior that needs to be run after a collection interval is complete.

Implementors§