pub struct TransactionMulti(/* private fields */);Implementations§
Source§impl TransactionMulti
impl TransactionMulti
pub async fn testing() -> TransactionMulti
Source§impl TransactionMulti
impl TransactionMulti
pub async fn new( store: TransactionStore, single: TransactionSingle, event_bus: EventBus, ) -> Result<TransactionMulti, Error>
Source§impl TransactionMulti
impl TransactionMulti
pub async fn version(&self) -> Result<CommitVersion, Error>
pub async fn begin_query(&self) -> Result<QueryTransaction, Error>
Source§impl TransactionMulti
impl TransactionMulti
pub async fn begin_command(&self) -> Result<CommandTransaction, Error>
Source§impl TransactionMulti
impl TransactionMulti
pub async fn get( &self, key: &EncodedKey, version: CommitVersion, ) -> Result<Option<Committed>, Error>
pub async fn contains_key( &self, key: &EncodedKey, version: CommitVersion, ) -> Result<bool, Error>
pub async fn range_batch( &self, range: EncodedKeyRange, version: CommitVersion, batch_size: u64, ) -> Result<MultiVersionBatch, Error>
pub async fn range( &self, range: EncodedKeyRange, version: CommitVersion, ) -> Result<MultiVersionBatch, Error>
pub async fn range_rev_batch( &self, range: EncodedKeyRange, version: CommitVersion, batch_size: u64, ) -> Result<MultiVersionBatch, Error>
pub async fn range_rev( &self, range: EncodedKeyRange, version: CommitVersion, ) -> Result<MultiVersionBatch, Error>
Sourcepub fn store(&self) -> &TransactionStore
pub fn store(&self) -> &TransactionStore
Get a reference to the underlying transaction store.
Source§impl TransactionMulti
impl TransactionMulti
Sourcepub async fn try_wait_for_watermark(
&self,
version: CommitVersion,
timeout: Duration,
) -> Result<(), AwaitWatermarkError>
pub async fn try_wait_for_watermark( &self, version: CommitVersion, timeout: Duration, ) -> Result<(), AwaitWatermarkError>
Wait for the watermark to reach the specified version. Returns Ok(()) if the watermark reaches the version within the timeout, or Err(AwaitWatermarkError) if the timeout expires.
Sourcepub async fn current_version(&self) -> Result<CommitVersion, Error>
pub async fn current_version(&self) -> Result<CommitVersion, Error>
Get the current version from the transaction manager
Sourcepub fn done_until(&self) -> CommitVersion
pub fn done_until(&self) -> CommitVersion
Returns the highest version where ALL prior versions have completed. This is useful for CDC polling to know the safe upper bound for fetching CDC events - all events up to this version are guaranteed to be in storage.
Sourcepub fn watermarks(&self) -> (CommitVersion, CommitVersion)
pub fn watermarks(&self) -> (CommitVersion, CommitVersion)
Returns (query_done_until, command_done_until) for debugging watermark state.
Trait Implementations§
Source§impl Clone for TransactionMulti
impl Clone for TransactionMulti
Source§fn clone(&self) -> TransactionMulti
fn clone(&self) -> TransactionMulti
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Deref for TransactionMulti
impl Deref for TransactionMulti
Source§impl MultiVersionTransaction for TransactionMulti
impl MultiVersionTransaction for TransactionMulti
type Query = QueryTransaction
type Command = CommandTransaction
fn begin_query<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<TransactionMulti as MultiVersionTransaction>::Query, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
TransactionMulti: 'async_trait,
fn begin_command<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<<TransactionMulti as MultiVersionTransaction>::Command, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
TransactionMulti: 'async_trait,
Source§impl WithEventBus for TransactionMulti
impl WithEventBus for TransactionMulti
Auto Trait Implementations§
impl Freeze for TransactionMulti
impl !RefUnwindSafe for TransactionMulti
impl Send for TransactionMulti
impl Sync for TransactionMulti
impl Unpin for TransactionMulti
impl !UnwindSafe for TransactionMulti
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more