trait SubmissionTracker extends AutoCloseable
Tracker for submission, backed by a SubmissionTrackerStore
.
The purpose of this tracker is to detect replayed requests, and allow the participant to emit a command completion only for genuine requests that it has submitted.
A request R1 is considered fresh iff it has the minimal requestId among all requests that have the same root hash, for which SubmissionData has been provided. In particular, for a given root hash there is at most one fresh request.
The ScalaDocs of the individual methods prescribe when to call the methods.
Calling the methods in a different order will result in undefined behavior.
Failure to call either cancelRegistration()
or provideSubmissionData()
after calling register()
for a request
may result in a deadlock.
- Alphabetic
- By Inheritance
- SubmissionTracker
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def cancelRegistration(rootHash: RootHash, requestId: RequestId)(implicit traceContext: TraceContext): Unit
Cancel a previously registered submission and perform the necessary cleanup.
Cancel a previously registered submission and perform the necessary cleanup. This method must be called for a request if and only if
provideSubmissionData
cannot be called.As a consequence, the associated
Future
returned byregister()
will be completed withfalse
. - abstract def close(): Unit
- Definition Classes
- AutoCloseable
- Annotations
- @throws(classOf[java.lang.Exception])
- abstract def provideSubmissionData(rootHash: RootHash, requestId: RequestId, submissionData: SubmissionData)(implicit traceContext: TraceContext): Unit
Provide the submission data necessary to decide on transaction validity.
- abstract def register(rootHash: RootHash, requestId: RequestId)(implicit traceContext: TraceContext): FutureUnlessShutdown[Boolean]
Register an ongoing transaction in the tracker.
Register an ongoing transaction in the tracker. This method must be called for every request id and with monotonically increasing request ids, i.e., in the synchronous part of Phase 3. The return value should be used to determine whether to emit a command completion in Phase 7. If the return value is
false
, the submitting participant of the underlying request should reject in Phase 3.- returns
a
Future
that represents the conditions: * the transaction is fresh, i.e. it is not a replay; * the transaction was submitted by this participant; * the transaction is timely, i.e. it was sequenced within its max sequencing time.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])