Package net.corda.core.internal
Class BackpressureAwareTimedFlow
-
- All Implemented Interfaces:
-
net.corda.core.internal.IdempotentFlow
,net.corda.core.internal.TimedFlow
public abstract class BackpressureAwareTimedFlow<ResultType extends Object> extends FlowLogic<ResultType> implements TimedFlow
Implementation of TimedFlow that can handle WaitTimeUpdate messages. Any flow talking to the notary should implement this and use explicit send and this class's receiveResultOrTiming to receive the response to handle cases where the notary sends a timeout update.
This is handling the special case of the notary where the notary service will have an internal queue on the uniqueness provider and we want to stop retries overwhelming that internal queue. As the TimedFlow mechanism and the notary service back-pressure are very specific to this use case at the moment, this implementation is internal and not for general use.
-
-
Field Summary
Fields Modifier and Type Field Description private final <Error class: unknown class>
logger
private final StateMachineRunId
runId
private final ServiceHub
serviceHub
private final Boolean
isKilled
private final PartyAndCertificate
ourIdentityAndCert
private final Party
ourIdentity
private final ProgressTracker
progressTracker
private final Boolean
isTimeoutEnabled
-
Constructor Summary
Constructors Constructor Description BackpressureAwareTimedFlow()
-
Method Summary
Modifier and Type Method Description final <ReceiveType extends Any> UntrustworthyData<ReceiveType>
receiveResultOrTiming(FlowSession session)
Unit
applyWaitTimeUpdate(FlowSession session, WaitTimeUpdate update)
-
Methods inherited from class net.corda.core.flows.FlowLogic
await, await, call, checkFlowIsNotKilled, checkFlowIsNotKilled, checkFlowPermission, close, flowStackSnapshot, getFlowInfo, getLogger, getOurIdentity, getOurIdentityAndCert, getProgressTracker, getRunId, getServiceHub, initiateFlow, initiateFlow, isKilled, persistFlowStackSnapshot, receive, receive, receiveAll, receiveAllMap, recordAuditEvent, send, sendAll, sendAllMap, sendAndReceive, sendAndReceive, subFlow, track, trackStepsTree, trackStepsTreeIndex, waitForLedgerCommit, waitForStateConsumption
-
Methods inherited from class net.corda.core.internal.TimedFlow
isTimeoutEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
receiveResultOrTiming
@CordaInternal() final <ReceiveType extends Any> UntrustworthyData<ReceiveType> receiveResultOrTiming(FlowSession session)
-
applyWaitTimeUpdate
Unit applyWaitTimeUpdate(FlowSession session, WaitTimeUpdate update)
-
-
-
-