public interface AsyncVerboseBucket
Intent of this interface is to provide the verbose version of
AsyncBucketProxy API.
All methods obey the same semantic but its results are more verbose.-
Method Summary
Modifier and TypeMethodDescriptionaddTokens(long tokensToAdd) Does the same thatBucket.addTokens(long)consumeIgnoringRateLimits(long tokens) Does the same thatBucket.consumeIgnoringRateLimits(long)estimateAbilityToConsume(long numTokens) Does the same thatBucket.estimateAbilityToConsume(long)forceAddTokens(long tokensToAdd) Does the same thatBucket.addTokens(long)Does the same thatBucket.getAvailableTokens()replaceConfiguration(BucketConfiguration newConfiguration, TokensInheritanceStrategy tokensInheritanceStrategy) Does the same thatBucket.replaceConfiguration(BucketConfiguration, TokensInheritanceStrategy)reset()Does the same thatBucket.reset()tryConsume(long numTokens) Does the same thatBucket.tryConsume(long)tryConsumeAndReturnRemaining(long numTokens) Does the same thatBucket.tryConsumeAndReturnRemaining(long)Does the same thatBucket.tryConsumeAsMuchAsPossible()tryConsumeAsMuchAsPossible(long limit) Does the same thatBucket.tryConsumeAsMuchAsPossible(long)
-
Method Details
-
tryConsume
Does the same thatBucket.tryConsume(long) -
consumeIgnoringRateLimits
Does the same thatBucket.consumeIgnoringRateLimits(long) -
tryConsumeAndReturnRemaining
Does the same thatBucket.tryConsumeAndReturnRemaining(long) -
estimateAbilityToConsume
Does the same thatBucket.estimateAbilityToConsume(long) -
tryConsumeAsMuchAsPossible
CompletableFuture<VerboseResult<Long>> tryConsumeAsMuchAsPossible()Does the same thatBucket.tryConsumeAsMuchAsPossible() -
tryConsumeAsMuchAsPossible
Does the same thatBucket.tryConsumeAsMuchAsPossible(long) -
addTokens
Does the same thatBucket.addTokens(long) -
forceAddTokens
Does the same thatBucket.addTokens(long) -
reset
CompletableFuture<VerboseResult<Nothing>> reset()Does the same thatBucket.reset() -
replaceConfiguration
CompletableFuture<VerboseResult<Nothing>> replaceConfiguration(BucketConfiguration newConfiguration, TokensInheritanceStrategy tokensInheritanceStrategy) Does the same thatBucket.replaceConfiguration(BucketConfiguration, TokensInheritanceStrategy) -
getAvailableTokens
CompletableFuture<VerboseResult<Long>> getAvailableTokens()Does the same thatBucket.getAvailableTokens()
-