Trait garage_table::replication::TableReplication[][src]

pub trait TableReplication: Send + Sync {
    fn read_nodes(&self, hash: &Hash) -> Vec<Uuid>;
fn read_quorum(&self) -> usize;
fn write_nodes(&self, hash: &Hash) -> Vec<Uuid>;
fn write_quorum(&self) -> usize;
fn max_write_errors(&self) -> usize;
fn partition_of(&self, hash: &Hash) -> Partition;
fn partitions(&self) -> Vec<(Partition, Hash)>; }
Expand description

Trait to describe how a table shall be replicated

Required methods

fn read_nodes(&self, hash: &Hash) -> Vec<Uuid>[src]

Which nodes to send read requests to

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

Responses needed to consider a read succesfull

fn write_nodes(&self, hash: &Hash) -> Vec<Uuid>[src]

Which nodes to send writes to

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

Responses needed to consider a write succesfull

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

fn partition_of(&self, hash: &Hash) -> Partition[src]

Get partition for data with given hash

fn partitions(&self) -> Vec<(Partition, Hash)>[src]

List of existing partitions

Implementors