Class QueriesExecutionContext
java.lang.Object
io.r2dbc.proxy.callback.QueriesExecutionContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the elapsed time from the stopwatch that has started bystartStopwatch().voidIncrement the count of consumptions fromResult#[map|getRowsUpdated].voidIncrement the count of producedResultfromStatement#execute.booleanWhether currently all producedResults are consumed.booleanWhether the executed queries have finished and results are consumed.voidWhenQueryInvocationSubscriberproduced allResultobjects.voidStart the stopwatch.
-
Constructor Details
-
QueriesExecutionContext
-
-
Method Details
-
incrementProducedCount
public void incrementProducedCount()Increment the count of producedResultfromStatement#execute. -
incrementConsumedCount
public void incrementConsumedCount()Increment the count of consumptions fromResult#[map|getRowsUpdated]. -
getElapsedDuration
Retrieve the elapsed time from the stopwatch that has started bystartStopwatch().- Returns:
- duration from start
-
startStopwatch
public void startStopwatch()Start the stopwatch. -
isQueryFinished
public boolean isQueryFinished()Whether the executed queries have finished and results are consumed.The query is considered finished when the publisher from
Statement#execute()have producedResults and those are consumed viaResult#getRowsUpdatedorResult#map.- Returns:
trueif allResultare produced and consumed.
-
isAllConsumed
-
markAllProduced
public void markAllProduced()WhenQueryInvocationSubscriberproduced allResultobjects.
-