class MediatorState extends NamedLogging
Provides state management for messages received by the mediator.
Non-finalized response aggregations are kept in memory, such that in case of the node shutting down,
they are lost but the participants waiting for a transaction result will simply timeout.
The finalized response aggregations are stored in the provided FinalizedResponseStore.
It is expected that fetchPendingRequestIdsBefore
operation is not called concurrently with operations
to modify the pending requests.
- Alphabetic
- By Inheritance
- MediatorState
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MediatorState(finalizedResponseStore: FinalizedResponseStore, metrics: MediatorMetrics, loggerFactory: NamedLoggerFactory)(implicit ec: ExecutionContext)
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 add(responseAggregation: ResponseAggregation)(implicit traceContext: TraceContext): Future[Unit]
Adds an incoming ResponseAggregation
- 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
- def fetch(requestId: RequestId)(implicit traceContext: TraceContext): EitherT[Future, MediatorRequestNotFound, ResponseAggregation]
- val finalizedResponseStore: FinalizedResponseStore
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getPending(requestId: RequestId): Option[ResponseAggregation]
Fetch a response aggregation from the pending requests collection.
- 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
- Attributes
- protected
- Definition Classes
- MediatorState → NamedLogging
- implicit def loggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- 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 pendingRequestIdsBefore(cutoff: CantonTimestamp): List[RequestId]
Fetch pending requests that have a timestamp below the provided
cutoff
- def prune(pruneRequestsBeforeAndIncludingTs: CantonTimestamp)(implicit traceContext: TraceContext): Future[Unit]
Prune unnecessary data from before and including the given timestamp which should be calculated by the Mediator based on the participant response timeout domain parameters.
Prune unnecessary data from before and including the given timestamp which should be calculated by the Mediator based on the participant response timeout domain parameters. In practice a much larger retention period may be kept.
- def replace(oldValue: ResponseAggregation, newValue: ResponseAggregation)(implicit traceContext: TraceContext): EitherT[Future, StaleVersion, Unit]
Replaces a ResponseAggregation for the
requestId
if the stored version matchescurrentVersion
.Replaces a ResponseAggregation for the
requestId
if the stored version matchescurrentVersion
. You can only use this to update non-finalized aggregations - 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])