pub trait BlobMulti: Debug {
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deadline: Instant,
        key: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, ExternalError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn list_keys<'life0, 'async_trait>(
        &'life0 self,
        deadline: Instant
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ExternalError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn set<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deadline: Instant,
        key: &'life1 str,
        value: Bytes,
        atomic: Atomicity
    ) -> Pin<Box<dyn Future<Output = Result<(), ExternalError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deadline: Instant,
        key: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), ExternalError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

An abstraction over read-write access to a bytes key->bytes value store.

Implementations are required to be linearizable.

TODO: Consider whether this can be relaxed. Since our usage is write-once modify-never, it certainly seems like we could by adding retries around get to wait for a non-linearizable set to show up. However, the tricky bit comes once we stop handing out seqno capabilities to readers and have to start reasoning about “this set hasn’t show up yet” vs “the blob has already been deleted”. Another tricky problem is the same but for a deletion when the first attempt timed out.

TODO: Rename this to Blob when we delete Blob.

Required methods

Returns a reference to the value corresponding to the key.

List all of the keys in the map.

Inserts a key-value pair into the map.

When atomicity is required, writes must be atomic and either succeed or leave the previous value intact.

Remove a key from the map.

Succeeds if the key does not exist.

Implementors