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
ifinitRc
isLong.MaxValue
.
- Alphabetic
- By Inheritance
- RequestCounterAllocatorImpl
- NamedLogging
- RequestCounterAllocator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
ifinitRc
isLong.MaxValue
.
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
- 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
andsc2
withsc1 < sc2
, then returning from the call forsc1
must happen before the call forsc2
.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
- RequestCounterAllocatorImpl → RequestCounterAllocator
- Exceptions thrown
java.lang.IllegalArgumentException
if the valuesLong.MaxValue
is used as a sequence counterjava.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 counterLong.MaxValue
cannot be used.
- 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
- 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
- Definition Classes
- RequestCounterAllocatorImpl → 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()
- 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
- RequestCounterAllocatorImpl → RequestCounterAllocator
- 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
- RequestCounterAllocatorImpl → RequestCounterAllocator
- 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 counterLong.MaxValue
cannot be used.
- 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])