Class TokenFiller
java.lang.Object
io.nosqlbench.engine.api.activityapi.ratelimits.TokenFiller
- All Implemented Interfaces:
java.lang.Runnable
public class TokenFiller
extends java.lang.Object
implements java.lang.Runnable
-
Field Summary
Fields Modifier and Type Field Description static doubleMAX_PER_SECONDstatic doubleMIN_PER_SECOND -
Constructor Summary
Constructors Constructor Description TokenFiller(RateSpec rateSpec, ThreadDrivenTokenPool tokenPool, io.nosqlbench.engine.api.activityimpl.ActivityDef def)A token filler adds tokens to aThreadDrivenTokenPoolat some rate. -
Method Summary
Modifier and Type Method Description TokenFillerapply(RateSpec rateSpec)TokenPoolgetTokenPool()longrestart()voidrun()TokenFillerstart()java.lang.StringtoString()
-
Field Details
-
MIN_PER_SECOND
public static final double MIN_PER_SECOND- See Also:
- Constant Field Values
-
MAX_PER_SECOND
public static final double MAX_PER_SECOND- See Also:
- Constant Field Values
-
-
Constructor Details
-
TokenFiller
public TokenFiller(RateSpec rateSpec, ThreadDrivenTokenPool tokenPool, io.nosqlbench.engine.api.activityimpl.ActivityDef def)A token filler adds tokens to aThreadDrivenTokenPoolat some rate. By default, this rate is at least every millisecond +- scheduling jitter in the JVM.- Parameters:
rateSpec- ARateSpecdef- AnActivityDef
-
-
Method Details