trait RequestCounterAllocator extends AnyRef
Allocates com.digitalasset.canton.RequestCounters for the transaction processor.
- Alphabetic
- By Inheritance
- RequestCounterAllocator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract 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
- 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.
- abstract 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.
- Annotations
- @VisibleForTesting()
- abstract 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.
- 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.
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() @IntrinsicCandidate()
- 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() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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])