c

com.digitalasset.canton.participant.protocol

RequestCounterAllocatorImpl

class RequestCounterAllocatorImpl extends RequestCounterAllocator with NamedLogging

Allocator for com.digitalasset.canton.RequestCounters.

This class is not thread safe.

Annotations
@SuppressWarnings()
Exceptions thrown

java.lang.IllegalArgumentException if initRc is Long.MaxValue.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequestCounterAllocatorImpl
  2. NamedLogging
  3. RequestCounterAllocator
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RequestCounterAllocatorImpl(initRc: RequestCounter, cleanReplaySequencerCounter: SequencerCounter, loggerFactory: NamedLoggerFactory)

    initRc

    The request counter to start from. Must not be Long.MaxValue.

    Exceptions thrown

    java.lang.IllegalArgumentException if initRc is Long.MaxValue.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def allocateFor(sc: SequencerCounter)(implicit traceContext: TraceContext): Option[RequestCounter]

    Allocates the next request counter to the confirmation request with the given com.digitalasset.canton.SequencerCounter.

    Allocates the next request counter to the confirmation request with the given com.digitalasset.canton.SequencerCounter.

    The assigned request counters form a contiguous sequence that can be monotonically embedded into the sequence of com.digitalasset.canton.SequencerCounters.

    All calls must be sequential with increasing sequencer counters, although they can run in different threads. So if allocateFor is called for two sequencer counters sc1 and sc2 with sc1 < sc2, then returning from the call for sc1 must happen before the call for sc2.

    Consecutive calls are idempotent. So if allocateFor is called for the same sequencer counter twice, without another intervening call for a difference sequencer counter, then the second call returns the same result as the first one.

    returns

    scala.None if the sequencer counter is before the clean replay starting point and request processing should be skipped

    Definition Classes
    RequestCounterAllocatorImplRequestCounterAllocator
    Exceptions thrown

    java.lang.IllegalArgumentException if the values Long.MaxValue is used as a sequence counter

    java.lang.IllegalStateException if no request counter can be assigned because an earlier call assigned already a com.digitalasset.canton.RequestCounter to a higher com.digitalasset.canton.SequencerCounter, or because all request counters have been exhausted. The request counter Long.MaxValue cannot be used.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  14. val loggerFactory: NamedLoggerFactory
  15. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def peek: RequestCounter

    Peeks at what would be the next request counter to allocate.

    Peeks at what would be the next request counter to allocate.

    Definition Classes
    RequestCounterAllocatorImplRequestCounterAllocator
  21. def skipRequestCounter(rc: RequestCounter)(implicit traceContext: TraceContext): Unit

    Skips the next request counter.

    Skips the next request counter.

    This allows for "holes" in the mapping of sequencer to request counters allowing for request counters for which no sequencer counters exist (for example "repair" requests made outside the realm of a sequencer).

    All calls must be sequential, and the only request counter that can be skipped is the "next" request counter that would have been allocated by allocateFor.

    Definition Classes
    RequestCounterAllocatorImplRequestCounterAllocator
    Exceptions thrown

    java.lang.IllegalArgumentException if the specified com.digitalasset.canton.RequestCounter is not the one that would otherwise be allocated next.

    java.lang.IllegalStateException if all request counters have been exhausted. The request counter Long.MaxValue cannot be used.

  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from NamedLogging

Inherited from AnyRef

Inherited from Any

Ungrouped