trait SequencerRateLimitManager extends AnyRef
Holds the traffic control state and control rate limiting logic of members of a sequencer
- Alphabetic
- By Inheritance
- SequencerRateLimitManager
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def consume(sender: Member, batch: Batch[ClosedEnvelope], sequencingTimestamp: CantonTimestamp, trafficState: TrafficState)(implicit ec: ExecutionContext, tc: TraceContext): EitherT[Future, SequencerRateLimitError, TrafficState]
Consume the traffic costs of the submission request from the sender's traffic state.
Consume the traffic costs of the submission request from the sender's traffic state.
NOTE: This method must be called in order of the sequencing timestamps.
- abstract def createNewTrafficStateAt(member: Member, timestamp: CantonTimestamp)(implicit ec: ExecutionContext, tc: TraceContext): Future[TrafficState]
Create a traffic state for a new member at the given timestamp.
Create a traffic state for a new member at the given timestamp. Its base traffic remainder will be equal to the max burst window configured at that point in time.
- abstract def getTrafficStatusFor(members: Map[Member, TrafficState])(implicit ec: ExecutionContext, tc: TraceContext): Future[Seq[MemberTrafficStatus]]
Compute the traffic status (including effective traffic limit) for members based on their traffic state
- abstract def topUp(member: Member, limit: TopUpEvent)(implicit ec: ExecutionContext, tc: TraceContext): Future[Unit]
Top up a member with its new extra traffic limit.
Top up a member with its new extra traffic limit. Must be strictly increasing between subsequent calls.
- member
member to top up
- abstract def updateTrafficStates(partialTrafficStates: Map[Member, TrafficState], timestamp: CantonTimestamp)(implicit ec: ExecutionContext, tc: TraceContext): Future[Map[Member, TrafficState]]
Takes a partial map of traffic states and update them to be up to date with the given timestamp.
Takes a partial map of traffic states and update them to be up to date with the given timestamp. In particular recompute relevant state fields for the effective extra traffic limit at that timestamp. The return state map will be merged back into the complete state.
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() @HotSpotIntrinsicCandidate()
- 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() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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])