Struct garage_table::replication::TableShardedReplication [−][src]
pub struct TableShardedReplication { pub system: Arc<System>, pub replication_factor: usize, pub read_quorum: usize, pub write_quorum: usize, }
Expand description
Sharded replication schema:
- based on the ring of nodes, a certain set of neighbors store entries, given as a function of the position of the entry’s hash in the ring
- reads are done on all of the nodes that replicate the data
- writes as well
Fields
system: Arc<System>
The membership manager of this node
replication_factor: usize
How many time each data should be replicated
read_quorum: usize
How many nodes to contact for a read, should be at most replication_factor
write_quorum: usize
How many nodes to contact for a write, should be at most replication_factor
Trait Implementations
impl Clone for TableShardedReplication
[src]
impl Clone for TableShardedReplication
[src]fn clone(&self) -> TableShardedReplication
[src]
fn clone(&self) -> TableShardedReplication
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl TableReplication for TableShardedReplication
[src]
impl TableReplication for TableShardedReplication
[src]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
Auto Trait Implementations
impl !RefUnwindSafe for TableShardedReplication
impl Send for TableShardedReplication
impl Sync for TableShardedReplication
impl Unpin for TableShardedReplication
impl !UnwindSafe for TableShardedReplication
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,