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]
fn read_nodes(&self, hash: &Hash) -> Vec<Uuid>
[src]Which nodes to send read requests to
fn read_quorum(&self) -> usize
[src]
fn read_quorum(&self) -> usize
[src]Responses needed to consider a read succesfull
fn write_nodes(&self, hash: &Hash) -> Vec<Uuid>
[src]
fn write_nodes(&self, hash: &Hash) -> Vec<Uuid>
[src]Which nodes to send writes to
fn write_quorum(&self) -> usize
[src]
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]
fn partition_of(&self, hash: &Hash) -> Partition
[src]Get partition for data with given hash
Implementors
impl TableReplication for TableFullReplication
[src]
impl TableReplication for TableFullReplication
[src]fn read_nodes(&self, _hash: &Hash) -> Vec<Uuid>
[src]
fn read_quorum(&self) -> usize
[src]
fn write_nodes(&self, _hash: &Hash) -> Vec<Uuid>
[src]
fn write_quorum(&self) -> usize
[src]
fn max_write_errors(&self) -> usize
[src]
fn partition_of(&self, _hash: &Hash) -> Partition
[src]
fn partitions(&self) -> Vec<(Partition, Hash)>
[src]
impl TableReplication for TableShardedReplication
[src]
impl TableReplication for TableShardedReplication
[src]