pub struct FlushOp<'a>(/* private fields */);Expand description
Restricted view of the batch op handed to
flush — everything an
AtomicOperation can do, and nothing else.
Committing belongs to the runner: after flush returns Ok, the
checkpoint is written and the transaction commits — items, work and
pointer land atomically. There is no access to the raw
es_entity::DbOp, mirroring BatchOp/IsolatedOp’s sealing.
Trait Implementations§
Source§impl AtomicOperation for FlushOp<'_>
Full delegation to the inner es_entity::DbOp — see the notes on
BatchOp’s impl for why every provided method is delegated too.
add_commit_hook delegation is what lets a flush body publish onto the
batch op (e.g. publish_all_persisted) with the events buffered on the
runner’s commit.
impl AtomicOperation for FlushOp<'_>
Full delegation to the inner es_entity::DbOp — see the notes on
BatchOp’s impl for why every provided method is delegated too.
add_commit_hook delegation is what lets a flush body publish onto the
batch op (e.g. publish_all_persisted) with the events buffered on the
runner’s commit.
Source§fn maybe_now(&self) -> Option<DateTime<Utc>>
fn maybe_now(&self) -> Option<DateTime<Utc>>
Function for querying when the operation is taking place - if it is cached.
Source§fn clock(&self) -> &ClockHandle
fn clock(&self) -> &ClockHandle
Returns the clock handle for time operations. Read more
Source§fn connection(&mut self) -> &mut Connection
fn connection(&mut self) -> &mut Connection
Returns the raw underlying connection.
The desired way to represent this would actually be as a GAT: Read more
Source§fn as_executor(&mut self) -> OneTimeExecutor<'_, &mut Connection>
fn as_executor(&mut self) -> OneTimeExecutor<'_, &mut Connection>
Returns the
sqlx::Executor implementation that statements should be
executed through. Read moreSource§fn add_commit_hook<H: CommitHook>(&mut self, hook: H) -> Result<(), H>
fn add_commit_hook<H: CommitHook>(&mut self, hook: H) -> Result<(), H>
Registers a commit hook that will run pre_commit before and post_commit after the transaction commits.
Returns Ok(()) if the hook was registered, Err(hook) if hooks are not supported.
Source§fn commit_hook<H: CommitHook>(&self) -> Option<&H>
fn commit_hook<H: CommitHook>(&self) -> Option<&H>
Typed shared access to the currently-accumulating commit hook of type
H,
if this operation supports commit hooks and one is registered.
Returns the hook a subsequent add_commit_hook::<H> call would merge into.Source§fn supports_hooks(&self) -> bool
fn supports_hooks(&self) -> bool
Whether this operation supports commit hooks. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FlushOp<'a>
impl<'a> !Sync for FlushOp<'a>
impl<'a> !UnwindSafe for FlushOp<'a>
impl<'a> Freeze for FlushOp<'a>
impl<'a> Send for FlushOp<'a>
impl<'a> Unpin for FlushOp<'a>
impl<'a> UnsafeUnpin for FlushOp<'a>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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