pub type DynLocalAgent = Arc<dyn LocalAgent>;Expand description
Trait-object LocalAgent.
Aliased Type§
pub struct DynLocalAgent { /* private fields */ }Trait Implementations§
Source§impl LocalAgent for DynLocalAgent
impl LocalAgent for DynLocalAgent
Source§fn register_cb(&self, cb: Arc<dyn Fn() + Send + Sync + 'static>)
fn register_cb(&self, cb: Arc<dyn Fn() + Send + Sync + 'static>)
Register a callback to be invoked when Self::invoke_cb is called.
Implementations need only track a single cb. If this is called again,
use only the new one.
Source§fn invoke_cb(&self)
fn invoke_cb(&self)
Invoke the registered cb if one has been set.
This can be treated as a no-op rather than an error if Self::register_cb has not yet been called.
Source§fn get_cur_storage_arc(&self) -> DhtArc
fn get_cur_storage_arc(&self) -> DhtArc
Access the current storage arc for this local agent. Read more
Source§fn set_cur_storage_arc(&self, arc: DhtArc)
fn set_cur_storage_arc(&self, arc: DhtArc)
Set the current storage arc for this local agent.
This will be initially set to zero on space join.
The gossip module will update this as data is collected.
Source§fn get_tgt_storage_arc(&self) -> DhtArc
fn get_tgt_storage_arc(&self) -> DhtArc
This is a chance for the implementor to influence how large
a storage arc should be for this agent. The gossip module will
attempt to collect enough data for claiming storage authority
over this range.
Source§fn set_tgt_storage_arc_hint(&self, arc: DhtArc)
fn set_tgt_storage_arc_hint(&self, arc: DhtArc)
The sharding module will attempt to determine an ideal target
arc for this agent. An implementation is free to use or discard
this information when returning the arc in Self::get_tgt_storage_arc.
This will initially be set to zero on join, but the sharding module
may later update this to FULL or a true target value.