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
Which nodes to send read requests to
fn read_quorum(&self) -> usize
fn read_quorum(&self) -> usize
Responses needed to consider a read succesfull
Which nodes to send writes to
fn write_quorum(&self) -> usize
fn write_quorum(&self) -> usize
Responses needed to consider a write succesfull
fn max_write_errors(&self) -> usize
fn partition_of(&self, hash: &Hash) -> Partition
fn partition_of(&self, hash: &Hash) -> Partition
Get partition for data with given hash