class TrafficConsumedManager extends NamedLogging

Holds the traffic consumed state of a member. This is used by the sequencer to keep track of the traffic consumed by its members, as well as by the members themselves in the TrafficStateController to keep track of their own traffic consumed.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TrafficConsumedManager
  2. NamedLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TrafficConsumedManager(member: Member, initValue: TrafficConsumed, loggerFactory: NamedLoggerFactory, metrics: TrafficConsumptionMetrics)

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 canConsumeAt(params: TrafficControlParameters, cost: NonNegativeLong, timestamp: CantonTimestamp, trafficPurchasedO: Option[TrafficPurchased])(implicit traceContext: TraceContext): Either[NotEnoughTraffic, Unit]

    Validate that the event cost is below the traffic limit at the provided timestamp.

    Validate that the event cost is below the traffic limit at the provided timestamp. DOES NOT debit the cost from the traffic state.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def consumeIfEnoughTraffic(params: TrafficControlParameters, eventCost: NonNegativeLong, timestamp: CantonTimestamp, trafficPurchasedO: Option[TrafficPurchased])(implicit traceContext: TraceContext, metricsContext: MetricsContext): Either[NotEnoughTraffic, TrafficConsumed]

    Consume the event cost at the given timestamp if enough traffic is available.

    Consume the event cost at the given timestamp if enough traffic is available. This MUST be called sequentially.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. def getTrafficConsumed: TrafficConsumed
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  16. val loggerFactory: NamedLoggerFactory
    Definition Classes
    TrafficConsumedManagerNamedLogging
  17. val member: Member
  18. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. def updateAt(timestamp: CantonTimestamp, params: TrafficControlParameters, logger: TracedLogger)(implicit traceContext: TraceContext, metricsContext: MetricsContext): TrafficConsumed

    Update the traffic consumed state to the given timestamp, including updating base rate remainder, ONLY if it's not already up to date.

  26. def updateWithReceipt(trafficReceipt: TrafficReceipt, timestamp: CantonTimestamp)(implicit metricsContext: MetricsContext): Boolean

    Update the traffic consumed state with the provided receipt only if it is more recent.

    Update the traffic consumed state with the provided receipt only if it is more recent.

    returns

    true if the state was updated.

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

Inherited from Any

Ungrouped