Skip to main content

PagingPolicy

Trait PagingPolicy 

Source
pub trait PagingPolicy: Send + Sync {
    // Required methods
    fn decide(&self, hint: PageHint) -> PageDecision;
    fn record(&self, event: PageEvent);
}
Expand description

Decides whether/how to page a column out, and records page events.

Implementations carry their own state (counters, atomics, configuration) via interior mutability. Methods take &self so a single policy can be shared across operator threads.

Required Methods§

Source

fn decide(&self, hint: PageHint) -> PageDecision

Returns the action to take for a column with the given hint.

Source

fn record(&self, event: PageEvent)

Records a pageout/pagein/failure event for metrics or adaptive decisions.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§