Module io.github.bucket4j.core
Class DelayParameters
java.lang.Object
io.github.bucket4j.distributed.proxy.optimization.DelayParameters
Describes parameters for
DelayOptimization.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal longfinal long -
Constructor Summary
ConstructorsConstructorDescriptionDelayParameters(long maxUnsynchronizedTokens, Duration maxTimeoutBetweenSynchronization) Creates the new instance ofDelayParameters -
Method Summary
-
Field Details
-
maxUnsynchronizedTokens
public final long maxUnsynchronizedTokens -
maxUnsynchronizedTimeoutNanos
public final long maxUnsynchronizedTimeoutNanos
-
-
Constructor Details
-
DelayParameters
Creates the new instance ofDelayParameters- Parameters:
maxUnsynchronizedTokens- threshold that describes how many tokens can be consumed locally without synchronization with external storage. Must be a positive number.maxTimeoutBetweenSynchronization- threshold that describes how long bucket proxy can act locally without synchronization with external storage. Must be a positive duration.
-