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()
.void
Increment the count of consumptions fromResult#[map|getRowsUpdated]
.void
Increment the count of producedResult
fromStatement#execute
.boolean
Whether currently all producedResult
s are consumed.boolean
Whether the executed queries have finished and results are consumed.void
WhenQueryInvocationSubscriber
produced allResult
objects.void
Start the stopwatch.
-
Constructor Details
-
QueriesExecutionContext
-
-
Method Details
-
incrementProducedCount
public void incrementProducedCount()Increment the count of producedResult
fromStatement#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 producedResult
s and those are consumed viaResult#getRowsUpdated
orResult#map
.- Returns:
true
if allResult
are produced and consumed.
-
isAllConsumed
-
markAllProduced
public void markAllProduced()WhenQueryInvocationSubscriber
produced allResult
objects.
-