aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/replication_mode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/replication_mode.rs')
-rw-r--r--src/rpc/replication_mode.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rpc/replication_mode.rs b/src/rpc/replication_mode.rs
index e244e063..b142ea10 100644
--- a/src/rpc/replication_mode.rs
+++ b/src/rpc/replication_mode.rs
@@ -21,13 +21,6 @@ impl ReplicationMode {
}
}
- pub fn control_write_max_faults(&self) -> usize {
- match self {
- Self::None => 0,
- _ => 1,
- }
- }
-
pub fn replication_factor(&self) -> usize {
match self {
Self::None => 1,
@@ -54,4 +47,11 @@ impl ReplicationMode {
Self::ThreeWayDangerous => 1,
}
}
+
+ pub fn is_read_after_write_consistent(&self) -> bool {
+ match self {
+ Self::None | Self::TwoWay | Self::ThreeWay => true,
+ _ => false,
+ }
+ }
}