risingwave_storage::store

Trait StateStoreRead

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

    // Required methods
    fn get_keyed_row(
        &self,
        key: TableKey<Bytes>,
        epoch: u64,
        read_options: ReadOptions,
    ) -> impl Future<Output = StorageResult<Option<StateStoreKeyedRow>>> + Send + '_;
    fn iter(
        &self,
        key_range: TableKeyRange,
        epoch: u64,
        read_options: ReadOptions,
    ) -> impl Future<Output = StorageResult<Self::Iter>> + Send + '_;
    fn rev_iter(
        &self,
        key_range: TableKeyRange,
        epoch: u64,
        read_options: ReadOptions,
    ) -> impl Future<Output = StorageResult<Self::RevIter>> + Send + '_;
    fn iter_log(
        &self,
        epoch_range: (u64, u64),
        key_range: TableKeyRange,
        options: ReadLogOptions,
    ) -> impl Future<Output = StorageResult<Self::ChangeLogIter>> + Send + '_;

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

Required Associated Types§

Required Methods§

source

fn get_keyed_row( &self, key: TableKey<Bytes>, epoch: u64, read_options: ReadOptions, ) -> impl Future<Output = StorageResult<Option<StateStoreKeyedRow>>> + Send + '_

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 Future<Output = StorageResult<Self::Iter>> + Send + '_

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 Future<Output = StorageResult<Self::RevIter>> + Send + '_

source

fn iter_log( &self, epoch_range: (u64, u64), key_range: TableKeyRange, options: ReadLogOptions, ) -> impl Future<Output = StorageResult<Self::ChangeLogIter>> + Send + '_

Provided Methods§

source

fn get( &self, key: TableKey<Bytes>, epoch: u64, read_options: ReadOptions, ) -> impl Future<Output = StorageResult<Option<Bytes>>> + Send + '_

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§

source§

impl StateStoreRead for HummockStorage

source§

impl StateStoreRead for LocalHummockStorage

source§

impl StateStoreRead for PanicStateStore

source§

impl StateStoreRead for BoxDynamicDispatchedStateStore

source§

impl<A: StateStoreRead, E: StateStoreRead> StateStoreRead for VerifyStateStore<A, E>

source§

impl<R: RangeKv> StateStoreRead for RangeKvStateStore<R>

source§

impl<S: StateStoreRead> StateStoreRead for MonitoredStateStore<S>