Package | Description |
---|---|
io.github.bucket4j |
Modifier and Type | Field and Description |
---|---|
static BlockingStrategy |
BlockingStrategy.PARKING |
Modifier and Type | Method and Description |
---|---|
void |
AbstractBucket.consume(long tokensToConsume,
BlockingStrategy blockingStrategy) |
void |
BlockingBucket.consume(long numTokens,
BlockingStrategy blockingStrategy)
Consumes a specified number of tokens from the bucket.
|
default boolean |
BlockingBucket.tryConsume(long numTokens,
Duration maxWait,
BlockingStrategy blockingStrategy)
This is just overloaded equivalent of
BlockingBucket.tryConsume(long, long, BlockingStrategy) |
boolean |
AbstractBucket.tryConsume(long tokensToConsume,
long maxWaitTimeNanos,
BlockingStrategy blockingStrategy) |
boolean |
BlockingBucket.tryConsume(long numTokens,
long maxWaitTimeNanos,
BlockingStrategy blockingStrategy)
Tries to consume a specified number of tokens from the bucket.
|
Copyright © 2021. All rights reserved.