pub struct PostgresChunkTransactionManager { /* private fields */ }Expand description
PostgreSQL same-resource chunk transaction manager.
Each launched chunk receives a single adapter-owned connection. Enlisted business statements and provider-produced checkpoint/context are committed with step counters and the optimistic version.
Implementations§
Source§impl PostgresChunkTransactionManager
impl PostgresChunkTransactionManager
Sourcepub const fn new(
repository: PostgresJobRepository,
state_provider: Arc<dyn PostgresChunkStateProvider>,
) -> Self
pub const fn new( repository: PostgresJobRepository, state_provider: Arc<dyn PostgresChunkStateProvider>, ) -> Self
Constructs a same-resource transaction manager.
Sourcepub async fn load_committed_state(
&self,
context: ChunkTransactionContext,
) -> Result<PostgresDurableStepState, RepositoryError>
pub async fn load_committed_state( &self, context: ChunkTransactionContext, ) -> Result<PostgresDurableStepState, RepositoryError>
Reads the authoritative committed state through a healthy connection.
§Errors
Returns a redacted repository failure when the execution is missing or its durable state cannot be validated.
Trait Implementations§
Source§impl ChunkTransactionManager for PostgresChunkTransactionManager
impl ChunkTransactionManager for PostgresChunkTransactionManager
Source§fn begin(
&self,
) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>>
fn begin( &self, ) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>>
Starts one transaction for a bounded chunk attempt.
Source§fn begin_for(
&self,
context: ChunkTransactionContext,
) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>>
fn begin_for( &self, context: ChunkTransactionContext, ) -> BoxFuture<'_, Result<Box<dyn ChunkTransaction + '_>, ChunkTransactionError>>
Starts one transaction bound to a durable repository execution. Read more
Source§fn inherited_progress(
&self,
context: ChunkTransactionContext,
) -> BoxFuture<'_, Result<InheritedStepProgress, ChunkTransactionError>>
fn inherited_progress( &self, context: ChunkTransactionContext, ) -> BoxFuture<'_, Result<InheritedStepProgress, ChunkTransactionError>>
Returns the durable progress this step attempt inherits. Read more
Source§impl Clone for PostgresChunkTransactionManager
impl Clone for PostgresChunkTransactionManager
Source§fn clone(&self) -> PostgresChunkTransactionManager
fn clone(&self) -> PostgresChunkTransactionManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PostgresChunkTransactionManager
impl !UnwindSafe for PostgresChunkTransactionManager
impl Freeze for PostgresChunkTransactionManager
impl Send for PostgresChunkTransactionManager
impl Sync for PostgresChunkTransactionManager
impl Unpin for PostgresChunkTransactionManager
impl UnsafeUnpin for PostgresChunkTransactionManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more