Trait glommio::SharesManager[][src]

pub trait SharesManager {
    fn shares(&self) -> usize;

    fn adjustment_period(&self) -> Duration { ... }
}

The SharesManager allows the user to implement dynamic shares for a TaskQueue

In terms of behavior, a TaskQueue with static shares is the same as a SharesManager managed queue that always return the same value. However this is a bit more expensive to compute because it needs to be reevaluated constantly.

The difference is akin to a constant versus variable in your favorite programming language.

Required methods

fn shares(&self) -> usize[src]

The amount of shares that this TaskQueue should receive in the next adjustment period

Loading content...

Provided methods

fn adjustment_period(&self) -> Duration[src]

How often to recompute the amount of shares for this TaskQueue

Loading content...

Trait Implementations

impl Debug for dyn SharesManager[src]

Implementors

Loading content...