pub struct NodeMemoryGovernor {
pub governor: MemoryGovernor,
/* private fields */
}Expand description
Node-level governor: one MemoryGovernor plus tablet accounting.
Fields§
§governor: MemoryGovernorUnderlying governor.
Implementations§
Source§impl NodeMemoryGovernor
impl NodeMemoryGovernor
Sourcepub fn new(governor: MemoryGovernor) -> Self
pub fn new(governor: MemoryGovernor) -> Self
Wrap an existing governor.
Sourcepub fn adjust_tablet(&mut self, tablet: TabletId, delta: i64)
pub fn adjust_tablet(&mut self, tablet: TabletId, delta: i64)
Record a tablet reservation delta (positive = reserve, negative = release).
Sourcepub fn evaluate(&mut self, inputs: &NodePressureInputs) -> Vec<GovernorAction>
pub fn evaluate(&mut self, inputs: &NodePressureInputs) -> Vec<GovernorAction>
Evaluate inputs and produce ordered actions (escalation ladder).
Sourcepub fn last_actions(&self) -> &[GovernorAction]
pub fn last_actions(&self) -> &[GovernorAction]
Last actions from [evaluate].
Sourcepub fn tablet_reserved_bytes(&self) -> u64
pub fn tablet_reserved_bytes(&self) -> u64
Sum of per-tablet reservations.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NodeMemoryGovernor
impl !UnwindSafe for NodeMemoryGovernor
impl Freeze for NodeMemoryGovernor
impl Send for NodeMemoryGovernor
impl Sync for NodeMemoryGovernor
impl Unpin for NodeMemoryGovernor
impl UnsafeUnpin for NodeMemoryGovernor
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