Skip to main content

WriteOracle

Trait WriteOracle 

Source
pub trait WriteOracle {
    type Error: From<MergeError>;

    // Required methods
    fn timestamp(
        &self,
        write: WriteId,
    ) -> Result<Option<Timestamp>, Self::Error>;
    fn had_read(
        &self,
        reader: WriteId,
        earlier: WriteId,
    ) -> Result<bool, Self::Error>;
}
Expand description

Access to applied write metadata. The arriving write is not yet in this view. Implementations must report missing metadata, never invent it, and a failure to read it is their own error, never a missing write. No applied row-change history is required by the incremental step.

Required Associated Types§

Source

type Error: From<MergeError>

Reading the metadata failed, or a merge check on it did.

Required Methods§

Source

fn timestamp(&self, write: WriteId) -> Result<Option<Timestamp>, Self::Error>

The timestamp of an applied write, or None if it is not applied.

Source

fn had_read( &self, reader: WriteId, earlier: WriteId, ) -> Result<bool, Self::Error>

Whether an applied write had read another write.

Implementors§