RelayCompactionCoordinator class

Decides when the relay asks a client to upload a snapshot to compact a room log.

One coordinator is shared by every session of a relay server so that at most one client per room is asked at a time: once shouldCompact returns true for a room, it returns false for the retry interval, giving the asked client time to upload before another client is bothered.

Constructors

RelayCompactionCoordinator({int? logCompactThreshold, Duration? retryInterval, DateTime now()?})
Decides when the relay asks a client to upload a snapshot to compact a room log.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset(String roomId) → void
Clears the rate limit for roomId.
shouldCompact(String roomId, int logLength) bool
Whether the client currently being answered should be asked to upload a snapshot for roomId, given the current logLength.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited