com.digitalasset.canton.sequencing
SequencedEventMonotonicityChecker
Companion object SequencedEventMonotonicityChecker
class SequencedEventMonotonicityChecker extends NamedLogging
Checks that the sequenced events' stream is gap-free:
- We expect event timestamps to be monotonically increasing
- The sequence should start with
previousTimestamp = None
. - For each subsequent event, we expect
previousTimestamp
to be set to the timestamp of the previous event. - When a violation is detected, an error is logged and the processing is aborted.
This is normally ensured by the com.digitalasset.canton.sequencing.client.SequencedEventValidator for individual sequencer subscriptions. However, due to aggregating multiple subscriptions from several sequencers up to a threshold, the stream of events emitted by the aggregation may violate monotonicity. This additional monotonicity check ensures that we catch such violations before we pass the events downstream.
- Alphabetic
- By Inheritance
- SequencedEventMonotonicityChecker
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SequencedEventMonotonicityChecker(previousEventTimestamp: Option[CantonTimestamp], loggerFactory: NamedLoggerFactory)
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]) @IntrinsicCandidate() @native()
- 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
- def flow[E]: Flow[WithKillSwitch[Either[E, SequencedSerializedEvent]], WithKillSwitch[Either[E, SequencedSerializedEvent]], NotUsed]
Pekko version of the check.
Pekko version of the check. Pulls the kill switch and drains the source when a violation is detected.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def handler(handler: SequencedApplicationHandler[ClosedEnvelope]): SequencedApplicationHandler[ClosedEnvelope]
com.digitalasset.canton.sequencing.ApplicationHandler version.
- Exceptions thrown
com.digitalasset.canton.sequencing.SequencedEventMonotonicityChecker.MonotonicityFailureException
when a monotonicity violation is detected
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Attributes
- protected
- Definition Classes
- SequencedEventMonotonicityChecker → 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
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- 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])