class RequestJournal extends RequestJournalReader with NamedLogging

The request journal records the committed com.digitalasset.canton.participant.protocol.RequestJournal.RequestState! associated with particular requests. The request journal is only written to by the com.digitalasset.canton.participant.protocol.ProtocolProcessors. In particular, reads of request journal state are used for maintaining consistency in reads from contract stores. The request journal is also used for bookkeeping and recovery. The only exception to the writing rule is the com.digitalasset.canton.participant.store.RequestJournalStore.prune method, which may be user-triggered, though the call's pre-conditions must be respected.

For every request, which is identified by a participant-local request counter, the request journal records the com.digitalasset.canton.participant.protocol.RequestJournal.RequestState associated with the request counter.

The request journal also stores the timestamp associated with the request. The assumption is made that every request is associated with only one timestamp. However, several requests may have the same timestamp.

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

Instance Constructors

  1. new RequestJournal(store: RequestJournalStore, metrics: ConnectedSynchronizerMetrics, loggerFactory: NamedLoggerFactory, initRc: RequestCounter)(implicit ec: ExecutionContext)

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def insert(rc: RequestCounter, requestTimestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Insert a new request into the request journal.

    Insert a new request into the request journal. The insertion will become visible immediately. The request has the initial state RequestJournal.RequestState.Pending.

    Preconditions:

    • The request counter must not have been previously inserted.
    • The request counter must be at least the front value of pendingCursor.
    • The request counter must not be Long.MaxValue.
    rc

    The request counter for the request.

    requestTimestamp

    The timestamp on the request message.

    returns

    A future that will terminate as soon as the request has been stored or fail if a precondition is violated.

  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  14. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    RequestJournalNamedLogging
  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
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. def numberOfDirtyRequests: Int

    Yields the number of requests that are currently not in state clean.

    Yields the number of requests that are currently not in state clean.

    The number may be incorrect, if previous calls to insert or terminate have failed with an exception. This can be tolerated, as the ConnectedSynchronizer should be restarted after such an exception and that will reset the request journal.

  21. def query(rc: RequestCounter)(implicit traceContext: TraceContext): OptionT[FutureUnlessShutdown, RequestData]

    Returns the RequestJournal.RequestData associated with the given request counter, if any.

    Returns the RequestJournal.RequestData associated with the given request counter, if any. Modifications done through the RequestJournal interface show up eventually, not necessarily immediately.

    Definition Classes
    RequestJournalRequestJournalReader
  22. def size(start: CantonTimestamp = CantonTimestamp.Epoch, end: Option[CantonTimestamp] = None)(implicit traceContext: TraceContext): FutureUnlessShutdown[Int]

    Counts requests whose timestamps lie between the given timestamps (inclusive).

    Counts requests whose timestamps lie between the given timestamps (inclusive).

    start

    Count all requests after or at the given timestamp

    end

    Count all requests before or at the given timestamp; use None to impose no upper limit

    Annotations
    @VisibleForTesting()
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def terminate(rc: RequestCounter, requestTimestamp: CantonTimestamp, commitTime: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Moves the given request to RequestJournal.RequestState.Clean and sets the commit time.

    Moves the given request to RequestJournal.RequestState.Clean and sets the commit time. Does nothing if the request was already clean.

    Preconditions:

    • The request counter rc is in this request journal with timestamp requestTimestamp.
    • The commit time must be after or at the request time of the request.
    • The methods insert and terminate are not called concurrently.
    requestTimestamp

    The timestamp assigned to the request counter

    returns

    A future that completes as soon as the state change has been persisted or fails if a precondition is violated. The future itself contains a future that completes as soon as the clean cursor reaches rc.

  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. 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

    (Since version 9)

Inherited from NamedLogging

Inherited from RequestJournalReader

Inherited from AnyRef

Inherited from Any

Ungrouped