pub struct RoundRobinRouting { /* private fields */ }Expand description
Round-robin dispatch policy
This policy can handle changing membership, but won’t start a new round immediately on change.
Implementations§
Source§impl RoundRobinRouting
impl RoundRobinRouting
Sourcepub fn new() -> RoundRobinRouting
pub fn new() -> RoundRobinRouting
Create a new instance starting at index 0
Sourcepub fn get_and_increment_index(&self, length: usize) -> usize
pub fn get_and_increment_index(&self, length: usize) -> usize
Get and return the current index and increment it for the next invocation
Trait Implementations§
Source§impl Debug for RoundRobinRouting
impl Debug for RoundRobinRouting
Source§impl Default for RoundRobinRouting
impl Default for RoundRobinRouting
Source§fn default() -> RoundRobinRouting
fn default() -> RoundRobinRouting
Returns the “default value” for a type. Read more
Source§impl RoutingPolicy<DynActorRef, NetMessage> for RoundRobinRouting
impl RoutingPolicy<DynActorRef, NetMessage> for RoundRobinRouting
Source§fn route(
&self,
members: &[&DynActorRef],
msg: NetMessage,
logger: &Logger<Arc<Fuse<Async>>>,
)
fn route( &self, members: &[&DynActorRef], msg: NetMessage, logger: &Logger<Arc<Fuse<Async>>>, )
Source§fn boxed_clone(
&self,
) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
fn boxed_clone( &self, ) -> Box<dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync>
Create a boxed copy of this policy Read more
Source§fn broadcast(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn broadcast( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the broadcast part of this policy, if any
Source§fn select(
&self,
) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
fn select( &self, ) -> Option<&(dyn RoutingPolicy<DynActorRef, NetMessage> + Send + Sync)>
Provide the select part of this policy, if any
Auto Trait Implementations§
impl !Freeze for RoundRobinRouting
impl RefUnwindSafe for RoundRobinRouting
impl Send for RoundRobinRouting
impl Sync for RoundRobinRouting
impl Unpin for RoundRobinRouting
impl UnsafeUnpin for RoundRobinRouting
impl UnwindSafe for RoundRobinRouting
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