pub struct ReplicatedEmbeddedStore { /* private fields */ }Implementations§
Source§impl ReplicatedEmbeddedStore
impl ReplicatedEmbeddedStore
pub fn new(shard_count: usize, config: ReplicationConfig) -> Result<Self>
pub fn with_route_mode( shard_count: usize, route_mode: EmbeddedRouteMode, config: ReplicationConfig, ) -> Result<Self>
pub fn get(&self, key: &[u8]) -> Option<Bytes>
pub fn set(&self, key: Bytes, value: Bytes, ttl_ms: Option<u64>)
pub fn delete(&self, key: &[u8]) -> bool
pub fn expire(&self, key: &[u8], expire_at_ms: u64) -> bool
Sourcepub fn snapshot(&self) -> ReplicationSnapshot
pub fn snapshot(&self) -> ReplicationSnapshot
Captures a consistent snapshot for replica bootstrap.
Watermarks are taken first so any mutation that lands between the
watermark read and the entry read is reflected in the entries. Catch-up
from this watermark may re-deliver those mutations, but apply_mutation
deduplicates by sequence so re-delivery is a no-op.
pub fn catch_up_replica(&self, replica: &mut ReplicationReplica) -> Result<()>
pub fn primary(&self) -> Arc<ReplicationPrimary> ⓘ
pub fn metrics_snapshot(&self) -> ReplicationMetricsSnapshot
pub fn inner(&self) -> &EmbeddedStore
Trait Implementations§
Source§impl Debug for ReplicatedEmbeddedStore
impl Debug for ReplicatedEmbeddedStore
Source§impl Drop for ReplicatedEmbeddedStore
impl Drop for ReplicatedEmbeddedStore
Source§impl SnapshotProvider for ReplicatedEmbeddedStore
impl SnapshotProvider for ReplicatedEmbeddedStore
Source§fn snapshot(&self) -> ReplicationSnapshot
fn snapshot(&self) -> ReplicationSnapshot
Returns a consistent snapshot together with the watermarks captured at
the same logical point.
Auto Trait Implementations§
impl !Freeze for ReplicatedEmbeddedStore
impl !RefUnwindSafe for ReplicatedEmbeddedStore
impl Send for ReplicatedEmbeddedStore
impl Sync for ReplicatedEmbeddedStore
impl Unpin for ReplicatedEmbeddedStore
impl UnsafeUnpin for ReplicatedEmbeddedStore
impl !UnwindSafe for ReplicatedEmbeddedStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more