pub trait StateStore:
StateStoreRead
+ StaticSendSync
+ Clone {
type Local: LocalStateStore;
// Required methods
fn try_wait_epoch(
&self,
epoch: HummockReadEpoch,
options: TryWaitEpochOptions,
) -> impl Future<Output = StorageResult<()>> + Send + '_;
fn new_local(
&self,
option: NewLocalOptions,
) -> impl Future<Output = Self::Local> + Send + '_;
// Provided method
fn monitored(
self,
storage_metrics: Arc<MonitoredStorageMetrics>,
) -> MonitoredStateStore<Self> { ... }
}
Required Associated Types§
type Local: LocalStateStore
Required Methods§
sourcefn try_wait_epoch(
&self,
epoch: HummockReadEpoch,
options: TryWaitEpochOptions,
) -> impl Future<Output = StorageResult<()>> + Send + '_
fn try_wait_epoch( &self, epoch: HummockReadEpoch, options: TryWaitEpochOptions, ) -> impl Future<Output = StorageResult<()>> + Send + '_
If epoch is Committed
, we will wait until the epoch is committed and its data is ready to
read. If epoch is Current
, we will only check if the data can be read with this epoch.
fn new_local( &self, option: NewLocalOptions, ) -> impl Future<Output = Self::Local> + Send + '_
Provided Methods§
sourcefn monitored(
self,
storage_metrics: Arc<MonitoredStorageMetrics>,
) -> MonitoredStateStore<Self>
fn monitored( self, storage_metrics: Arc<MonitoredStorageMetrics>, ) -> MonitoredStateStore<Self>
Creates a MonitoredStateStore
from this state store, with given stats
.
Object Safety§
This trait is not object safe.