Skip to main content

ChunkTransactionManager

Trait ChunkTransactionManager 

Source
pub trait ChunkTransactionManager: Send + Sync {
    // Required method
    fn begin(
        &self,
    ) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>>;

    // Provided methods
    fn inherited_progress(
        &self,
        _context: ChunkTransactionContext,
    ) -> BoxFuture<'_, Result<InheritedStepProgress, ChunkTransactionError>> { ... }
    fn begin_for(
        &self,
        _context: ChunkTransactionContext,
    ) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>> { ... }
}
Expand description

Begins isolated adapter-owned chunk transactions.

Required Methods§

Source

fn begin( &self, ) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>>

Starts one transaction for a bounded chunk attempt.

Provided Methods§

Source

fn inherited_progress( &self, _context: ChunkTransactionContext, ) -> BoxFuture<'_, Result<InheritedStepProgress, ChunkTransactionError>>

Returns the durable progress this step attempt inherits.

The default suits managers without durable state. A durable adapter overrides it and fails closed rather than restarting bounded policy limits from zero.

Source

fn begin_for( &self, _context: ChunkTransactionContext, ) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>>

Starts one transaction bound to a durable repository execution.

The default preserves managers that do not need repository identity. Durable adapters override this method and reject unbound Self::begin calls rather than guessing an execution target.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§