aboutsummaryrefslogtreecommitdiff
path: root/src/table/replication/parameters.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/table/replication/parameters.rs')
-rw-r--r--src/table/replication/parameters.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/table/replication/parameters.rs b/src/table/replication/parameters.rs
index 2f842409..a4e701bb 100644
--- a/src/table/replication/parameters.rs
+++ b/src/table/replication/parameters.rs
@@ -3,6 +3,8 @@ use garage_util::data::*;
/// Trait to describe how a table shall be replicated
pub trait TableReplication: Send + Sync + 'static {
+ type WriteSets: AsRef<Vec<Vec<Uuid>>> + Send + Sync + 'static;
+
// See examples in table_sharded.rs and table_fullcopy.rs
// To understand various replication methods
@@ -15,7 +17,7 @@ pub trait TableReplication: Send + Sync + 'static {
fn read_quorum(&self) -> usize;
/// Which nodes to send writes to
- fn write_sets(&self, hash: &Hash) -> Vec<Vec<Uuid>>;
+ fn write_sets(&self, hash: &Hash) -> Self::WriteSets;
/// Responses needed to consider a write succesfull in each set
fn write_quorum(&self) -> usize;
fn max_write_errors(&self) -> usize;