Trait ReplicationStrategy

Source
pub trait ReplicationStrategy {
    // Required methods
    fn is_eligible_replica<N: KeyspaceNode>(
        &mut self,
        node: &NodeRef<N>,
    ) -> bool;
    fn clone(&self) -> Self;
}
Expand description

Replication strategy determines how to choose the nodes for redundancy.

Each instance of ReplicationStrategy is assumed to operate on a single shard of the keyspace, i.e. a single replica set of nodes.

Required Methods§

Source

fn is_eligible_replica<N: KeyspaceNode>(&mut self, node: &NodeRef<N>) -> bool

Checks if the given node is eligible for inclusion into a replica set.

Source

fn clone(&self) -> Self

Builds a new instance of the replication strategy.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§