AdaptiveQueryLimits

class AdaptiveQueryLimits(val limits: List<AdaptiveQueryLimit>, interval: Duration = AdaptiveLimitOptions.DEFAULT_INTERVAL, context: CoroutineContext = Dispatchers.Default) : AutoCloseable

Evaluates every one of limits each interval, from start to close. An evaluation that fails is logged; the next one runs all the same.

Constructors

Link copied to clipboard
constructor(limits: List<AdaptiveQueryLimit>, interval: Duration = AdaptiveLimitOptions.DEFAULT_INTERVAL, context: CoroutineContext = Dispatchers.Default)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun evaluate()

Evaluates every limit once.

Link copied to clipboard

Starts evaluating, the first one interval from now; starting twice, or with no limits, does nothing.