Bucket.addTokens(long)
, follows the same semantic.GridBucket
found that bucket state has been lost,
and GridBucket
is unable to repair bucket state or recovery strategy is RecoveryStrategy.THROW_BUCKET_NOT_FOUND_EXCEPTION
.SynchronizationStrategy.LOCK_FREE
synchronization strategy.ConfigurationBuilder
extensionClass
.SynchronizationStrategy.NONE
ConsumptionProbe.isConsumed()
returns true, else time in nanos which need to wait until requested amount of tokens will be refilledLockFreeBucket
).Bucket.replaceConfiguration(BucketConfiguration)
, follows the same rules and semantic.TimeMeter
which works around System.currentTimeMillis()
TimeMeter
which works around System.nanoTime()
Bucket.tryConsume(long)
, follows the same semantic.Bucket.tryConsumeAndReturnRemaining(long)
, follows the same semantic.Bucket.tryConsumeAsMuchAsPossible()
, follows the same semantic.Bucket.tryConsumeAsMuchAsPossible(long)
, follows the same semantic.limit
.Bucket.tryConsume(long, long, BlockingStrategy)
but ignores interrupts(just restores interruption flag on exit).ConfigurationBuilder
which will create buckets with customTimeMeter
as time meter.ConfigurationBuilder
which will create buckets with TimeMeter.SYSTEM_MILLISECONDS
as time meter.ConfigurationBuilder
which will create buckets with TimeMeter.SYSTEM_NANOTIME
as time meter.Copyright © 2017. All rights reserved.