Suspending Bucket Configuration
data class SuspendingBucketConfiguration(var timeMeter: TimeMeter = TimeMeter.SYSTEM_MILLISECONDS, mutableLimits: MutableList<Bandwidth> = mutableListOf())(source)
Defines the configuration for creating a SuspendingBucket.
Constructors
Link copied to clipboard
constructor(timeMeter: TimeMeter = TimeMeter.SYSTEM_MILLISECONDS, mutableLimits: MutableList<Bandwidth> = mutableListOf())
Properties
Link copied to clipboard
Set's the TimeMeter to be used by the underlying Bucket4j objects. By default, you may choose either TimeMeter.SYSTEM_MILLISECONDS or TimeMeter.SYSTEM_NANOSECONDS. Caution: see Bucket4j's documentation about using nanoseconds before choosing that option.
Functions
Link copied to clipboard
Adds a bandwidth limit to the bucket. See the Bucket4j documentation on Bandwidths for more information.
fun addLimit(limit: BandwidthBuilder.BandwidthBuilderCapacityStage.() -> BandwidthBuilder.BandwidthBuilderBuildStage)
Adds a bandwidth limit to the bucket. See the Bucket4j documentation on Bandwidths for more information.