class SendTracker extends NamedLogging with AutoCloseable
When a we make a send request to the sequencer it will not be sequenced until some point in the future and may not
be sequenced at all. To track a request call send
with the messageId and max-sequencing-time of the request,
the tracker then observes sequenced events and will notify the provided handler if the send times out.
- Alphabetic
- By Inheritance
- SendTracker
- AutoCloseable
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SendTracker(initialPendingSends: Map[MessageId, CantonTimestamp], store: SendTrackerStore, metrics: SequencerClientMetrics, loggerFactory: NamedLoggerFactory)(implicit executionContext: ExecutionContext)
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 cancelPendingSend(messageId: MessageId)(implicit traceContext: TraceContext): Future[Unit]
Cancels a pending send without notifying any callers of the result.
Cancels a pending send without notifying any callers of the result. Should only be used if the send operation itself fails and the transport returns an error indicating that the send will never be sequenced. The SequencerClient should then call cancel to immediately allow retries with the same message-id and then propagate the send error to the caller.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def close(): Unit
- Definition Classes
- SendTracker → AutoCloseable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- 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
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Attributes
- protected
- Definition Classes
- SendTracker → NamedLogging
- implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- 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
- def track(messageId: MessageId, maxSequencingTime: CantonTimestamp, callback: SendCallback = SendCallback.empty)(implicit traceContext: TraceContext): EitherT[Future, SavePendingSendError, Unit]
- def update(timeoutHandler: SendTimeoutHandler)(event: OrdinarySequencedEvent[_]): EitherT[Future, SequencerClientSubscriptionError.SendTrackerUpdateError, Unit]
Provide the latest sequenced event to update the send tracker and notify the handler of any sends that have timed out due to the new sequencing time.
Provide the latest sequenced event to update the send tracker and notify the handler of any sends that have timed out due to the new sequencing time. Callers must not call this concurrently and it is assumed that it is called with sequenced events in order of sequencing. On receiving an event it will perform the following steps in order:
- If the event is a Deliver or DeliverError from a send that is being tracked it will stop tracking this message id. This allows using the message-id for new sends. 2. Checks for any pending sends that have a max-sequencing-time that is less than the timestamp of this event. These events have timed out and a correct sequencer implementation will no longer sequence any events for this send. The provided timeout handler will be called with the timed out message id. If multiple sends are timed out the handler will be called sequentially with each message id (note there is currently no defined order for the message ids it will receive). If the handler fails the update method will immediately return and any subsequent timed out message ids will not be provided to the handler.
The operations performed by update are not atomic, if an error is encountered midway through processing an event then a subsequent replay will cause operations that still have pending sends stored to be retried.
- 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])