pub struct ActorRefReaper { /* private fields */ }Expand description
Reaps deallocated actor references from the underlying lookup table.
Implementations§
Source§impl ActorRefReaper
impl ActorRefReaper
Sourcepub fn new(
initial_interval: u64,
min: u64,
max: u64,
incr: u64,
decr: u64,
algo: FeedbackAlgorithm,
) -> ActorRefReaper
pub fn new( initial_interval: u64, min: u64, max: u64, incr: u64, decr: u64, algo: FeedbackAlgorithm, ) -> ActorRefReaper
Creates a reaper with the provided interval update parameters.
Sourcepub fn from_config(conf: &Config) -> ActorRefReaper
pub fn from_config(conf: &Config) -> ActorRefReaper
Builds a reaper from the Kompact configuration.
Sourcepub fn run(&self, table: &ArcSwapAny<Arc<ActorStore>>) -> usize
pub fn run(&self, table: &ArcSwapAny<Arc<ActorStore>>) -> usize
Walks through all stored [ActorRef] entries and removes the ones which have been deallocated, returning the # of removed instances.
Sourcepub fn strategy(&self) -> &UpdateStrategy
pub fn strategy(&self) -> &UpdateStrategy
Returns the current interval update strategy.
Sourcepub fn strategy_mut(&mut self) -> &mut UpdateStrategy
pub fn strategy_mut(&mut self) -> &mut UpdateStrategy
Returns the mutable interval update strategy.
Sourcepub fn is_scheduled(&self) -> bool
pub fn is_scheduled(&self) -> bool
Returns whether the reaper is already scheduled.
Trait Implementations§
Source§impl Default for ActorRefReaper
impl Default for ActorRefReaper
Source§fn default() -> ActorRefReaper
fn default() -> ActorRefReaper
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ActorRefReaper
impl RefUnwindSafe for ActorRefReaper
impl Send for ActorRefReaper
impl Sync for ActorRefReaper
impl Unpin for ActorRefReaper
impl UnsafeUnpin for ActorRefReaper
impl UnwindSafe for ActorRefReaper
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