risingwave_storage::store

Trait StateStoreRead

source
pub trait StateStoreRead: StaticSendSync {
    type Iter: StateStoreReadIter;
    type RevIter: StateStoreReadIter;

    // Required methods
    fn get_keyed_row(
        &self,
        key: TableKey<Bytes>,
        epoch: u64,
        read_options: ReadOptions,
    ) -> impl StorageFuture<'_, Option<StateStoreKeyedRow>>;
    fn iter(
        &self,
        key_range: TableKeyRange,
        epoch: u64,
        read_options: ReadOptions,
    ) -> impl StorageFuture<'_, Self::Iter>;
    fn rev_iter(
        &self,
        key_range: TableKeyRange,
        epoch: u64,
        read_options: ReadOptions,
    ) -> impl StorageFuture<'_, Self::RevIter>;

    // Provided method
    fn get(
        &self,
        key: TableKey<Bytes>,
        epoch: u64,
        read_options: ReadOptions,
    ) -> impl StorageFuture<'_, Option<Bytes>> { ... }
}

Required Associated Types§

Required Methods§

source

fn get_keyed_row( &self, key: TableKey<Bytes>, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, Option<StateStoreKeyedRow>>

Point gets a value from the state store. The result is based on a snapshot corresponding to the given epoch. Both full key and the value are returned.

source

fn iter( &self, key_range: TableKeyRange, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, Self::Iter>

Opens and returns an iterator for given prefix_hint and full_key_range Internally, prefix_hint will be used to for checking bloom_filter and full_key_range used for iter. (if the prefix_hint not None, it should be be included in key_range) The returned iterator will iterate data based on a snapshot corresponding to the given epoch.

source

fn rev_iter( &self, key_range: TableKeyRange, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, Self::RevIter>

Provided Methods§

source

fn get( &self, key: TableKey<Bytes>, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, Option<Bytes>>

Point gets a value from the state store. The result is based on a snapshot corresponding to the given epoch. Only the value is returned.

Object Safety§

This trait is not object safe.

Implementors§