Skip navigation links
A B C D E F G I L N O P R S T U V W 

A

AbstractBucket - Class in io.github.bucket4j
 
AbstractBucket(BucketListener) - Constructor for class io.github.bucket4j.AbstractBucket
 
AbstractBucketBuilder<T extends AbstractBucketBuilder> - Class in io.github.bucket4j
A builder for buckets.
AbstractBucketBuilder() - Constructor for class io.github.bucket4j.AbstractBucketBuilder
 
addLimit(Bandwidth) - Method in class io.github.bucket4j.AbstractBucketBuilder
Adds limited bandwidth for all buckets which will be constructed by this builder.
addLimit(Bandwidth) - Method in class io.github.bucket4j.ConfigurationBuilder
Adds limited bandwidth for all buckets which will be constructed by this builder instance.
addTokens(long) - Method in class io.github.bucket4j.AbstractBucket
 
addTokens(long) - Method in interface io.github.bucket4j.AsyncBucket
Asynchronous version of Bucket.addTokens(long), follows the same semantic.
addTokens(long) - Method in interface io.github.bucket4j.Bucket
Add tokensToAdd to bucket.
addTokens(Bandwidth[], long) - Method in class io.github.bucket4j.BucketState
 
addTokens(long) - Method in class io.github.bucket4j.grid.GridBucketState
 
addTokensAsyncImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
addTokensAsyncImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
addTokensAsyncImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
addTokensAsyncImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
AddTokensCommand - Class in io.github.bucket4j.grid
 
AddTokensCommand(long) - Constructor for class io.github.bucket4j.grid.AddTokensCommand
 
addTokensImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
addTokensImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
addTokensImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
addTokensImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
asAsync() - Method in class io.github.bucket4j.AbstractBucket
 
asAsync() - Method in interface io.github.bucket4j.Bucket
Returns asynchronous view of this bucket.
asAsyncScheduler() - Method in class io.github.bucket4j.AbstractBucket
 
asAsyncScheduler() - Method in interface io.github.bucket4j.Bucket
Returns asynchronous view of this bucket that allows to use bucket as async scheduler.
asScheduler() - Method in class io.github.bucket4j.AbstractBucket
 
asScheduler() - Method in interface io.github.bucket4j.Bucket
Returns the BlockingBucket view of this bucket, that provides operations which are able to block caller thread.
AsyncBucket - Interface in io.github.bucket4j
Provides asynchronous API for bucket.
AsyncScheduledBucket - Interface in io.github.bucket4j
Provides async API for bucket that allows to use bucket as async scheduler.

B

Bandwidth - Class in io.github.bucket4j
Anatomy of bandwidth:
BlockingBucket - Interface in io.github.bucket4j
Provides blocking API for bucket that allows to use bucket as scheduler.
BlockingStrategy - Interface in io.github.bucket4j
Specifies the way to block current thread to amount of time required to refill missed number of tokens in the bucket.
Bucket - Interface in io.github.bucket4j
Performs rate limiting using algorithm based on top of ideas of Token Bucket.
Bucket4j - Class in io.github.bucket4j
This is entry point for functionality provided bucket4j library.
BucketConfiguration - Class in io.github.bucket4j
 
BucketConfiguration(List<Bandwidth>) - Constructor for class io.github.bucket4j.BucketConfiguration
 
BucketExceptions - Class in io.github.bucket4j
 
BucketListener - Interface in io.github.bucket4j
Interface for listening bucket related events.
bucketNotFound() - Static method in class io.github.bucket4j.grid.CommandResult
 
BucketNotFoundException - Exception in io.github.bucket4j.grid
Exception which thrown each time when 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.
BucketNotFoundException(Serializable) - Constructor for exception io.github.bucket4j.grid.BucketNotFoundException
 
BucketState - Class in io.github.bucket4j
 
BucketState(BucketConfiguration, long) - Constructor for class io.github.bucket4j.BucketState
 
build() - Method in class io.github.bucket4j.ConfigurationBuilder
 
build() - Method in class io.github.bucket4j.local.LocalBucketBuilder
Constructs the bucket using SynchronizationStrategy.LOCK_FREE synchronization strategy.
buildConfiguration() - Method in class io.github.bucket4j.AbstractBucketBuilder
 
buildConfiguration() - Method in class io.github.bucket4j.ConfigurationBuilder
Deprecated.
builder() - Static method in class io.github.bucket4j.Bucket4j
Creates the new builder of in-memory buckets.
builder() - Method in interface io.github.bucket4j.Extension
Creates new instance of builder specific for this particular extension.

C

calculateDelayNanosAfterWillBePossibleToConsume(Bandwidth[], long, long) - Method in class io.github.bucket4j.BucketState
 
calculateDelayNanosAfterWillBePossibleToConsume(long, long) - Method in class io.github.bucket4j.grid.GridBucketState
 
checkCompatibility(BucketConfiguration) - Method in class io.github.bucket4j.BucketConfiguration
 
classic(long, Refill) - Static method in class io.github.bucket4j.Bandwidth
Specifies limitation in classic interpretation of token-bucket algorithm.
CommandResult<T extends Serializable> - Class in io.github.bucket4j.grid
 
CommandResult(T, boolean) - Constructor for class io.github.bucket4j.grid.CommandResult
 
configurationBuilder() - Static method in class io.github.bucket4j.Bucket4j
Creates new instance of ConfigurationBuilder
ConfigurationBuilder - Class in io.github.bucket4j
A builder for buckets.
ConfigurationBuilder() - Constructor for class io.github.bucket4j.ConfigurationBuilder
 
consume(long, BlockingStrategy) - Method in class io.github.bucket4j.AbstractBucket
 
consume(long, ScheduledExecutorService) - Method in interface io.github.bucket4j.AsyncScheduledBucket
Consumes the specified number of tokens from the bucket.
consume(long, BlockingStrategy) - Method in interface io.github.bucket4j.BlockingBucket
Consumes a specified number of tokens from the bucket.
consume(long) - Method in interface io.github.bucket4j.BlockingBucket
This is just overloaded equivalent of BlockingBucket.consume(long, BlockingStrategy)
consume(Bandwidth[], long) - Method in class io.github.bucket4j.BucketState
 
consume(long) - Method in class io.github.bucket4j.grid.GridBucketState
 
ConsumeAsMuchAsPossibleCommand - Class in io.github.bucket4j.grid
 
ConsumeAsMuchAsPossibleCommand(long) - Constructor for class io.github.bucket4j.grid.ConsumeAsMuchAsPossibleCommand
 
consumeAsMuchAsPossibleImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
consumeAsMuchAsPossibleImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
consumeAsMuchAsPossibleImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
consumeAsMuchAsPossibleImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
consumed(long) - Static method in class io.github.bucket4j.ConsumptionProbe
 
consumeUninterruptibly(long, UninterruptibleBlockingStrategy) - Method in class io.github.bucket4j.AbstractBucket
 
consumeUninterruptibly(long, UninterruptibleBlockingStrategy) - Method in interface io.github.bucket4j.BlockingBucket
Has same semantic with BlockingBucket.consume(long, BlockingStrategy) but ignores interrupts(just restores interruption flag on exit).
consumeUninterruptibly(long) - Method in interface io.github.bucket4j.BlockingBucket
ConsumptionProbe - Class in io.github.bucket4j
Describes both result of consumption and tokens remaining in the bucket after consumption.
copy() - Method in class io.github.bucket4j.BucketState
 
copyBucketState() - Method in class io.github.bucket4j.grid.GridBucketState
 
copyStateFrom(BucketState) - Method in class io.github.bucket4j.BucketState
 
createInitializedBucket(T, BucketConfiguration, GridProxy<T>, RecoveryStrategy) - Static method in class io.github.bucket4j.grid.GridBucket
 
createInitialState(BucketConfiguration, long) - Static method in class io.github.bucket4j.BucketState
 
createInitialState(K, BucketConfiguration) - Method in interface io.github.bucket4j.grid.GridProxy
 
createInitialStateAndExecute(K, BucketConfiguration, GridCommand<T>) - Method in interface io.github.bucket4j.grid.GridProxy
 
createInitialStateAndExecuteAsync(K, BucketConfiguration, GridCommand<T>) - Method in interface io.github.bucket4j.grid.GridProxy
 
createLazyBucket(T, Supplier<BucketConfiguration>, GridProxy<T>) - Static method in class io.github.bucket4j.grid.GridBucket
 
createSnapshot() - Method in interface io.github.bucket4j.Bucket
Creates the copy of internal state.
createSnapshot() - Method in class io.github.bucket4j.grid.GridBucket
 
createSnapshot() - Method in class io.github.bucket4j.local.LockFreeBucket
 
createSnapshot() - Method in class io.github.bucket4j.local.SynchronizedBucket
 
CreateSnapshotCommand - Class in io.github.bucket4j.grid
 
CreateSnapshotCommand() - Constructor for class io.github.bucket4j.grid.CreateSnapshotCommand
 
currentTimeNanos() - Method in interface io.github.bucket4j.TimeMeter
Returns current time in nanosecond precision, but not necessarily nanosecond resolution.

D

deepCopy() - Method in class io.github.bucket4j.grid.GridBucketState
 

E

execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.AddTokensCommand
 
execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.ConsumeAsMuchAsPossibleCommand
 
execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.CreateSnapshotCommand
 
execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.GetAvailableTokensCommand
 
execute(GridBucketState, long) - Method in interface io.github.bucket4j.grid.GridCommand
 
execute(K, GridCommand<T>) - Method in interface io.github.bucket4j.grid.GridProxy
 
execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.ReplaceConfigurationOrReturnPreviousCommand
 
execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.ReserveAndCalculateTimeToSleepCommand
 
execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.TryConsumeAndReturnRemainingTokensCommand
 
execute(GridBucketState, long) - Method in class io.github.bucket4j.grid.TryConsumeCommand
 
executeAsync(K, GridCommand<T>) - Method in interface io.github.bucket4j.grid.GridProxy
 
extension(Class<E>) - Static method in class io.github.bucket4j.Bucket4j
Locates Bucket4j extension by class extensionClass.
Extension<T extends AbstractBucketBuilder<T>> - Interface in io.github.bucket4j
Represents an extension point of bucket4j library.

F

FakeLock - Class in io.github.bucket4j.local
This is lock implementation which actually lock nothing, is used for SynchronizationStrategy.NONE

G

getAvailableTokens() - Method in interface io.github.bucket4j.Bucket
Returns amount of available tokens in this bucket.
getAvailableTokens(Bandwidth[]) - Method in class io.github.bucket4j.BucketState
 
getAvailableTokens() - Method in class io.github.bucket4j.grid.GridBucket
 
getAvailableTokens() - Method in class io.github.bucket4j.grid.GridBucketState
 
getAvailableTokens() - Method in class io.github.bucket4j.local.LockFreeBucket
 
getAvailableTokens() - Method in class io.github.bucket4j.local.SynchronizedBucket
 
GetAvailableTokensCommand - Class in io.github.bucket4j.grid
 
GetAvailableTokensCommand() - Constructor for class io.github.bucket4j.grid.GetAvailableTokensCommand
 
getBandwidths() - Method in class io.github.bucket4j.BucketConfiguration
 
getBucketId() - Method in exception io.github.bucket4j.grid.BucketNotFoundException
 
getConfiguration() - Method in class io.github.bucket4j.grid.GridBucketState
 
getConfiguration(K) - Method in interface io.github.bucket4j.grid.GridProxy
 
getConfiguration() - Method in interface io.github.bucket4j.local.LocalBucket
Returns configuration of this bucket.
getConfiguration() - Method in class io.github.bucket4j.local.LockFreeBucket
 
getConfiguration() - Method in class io.github.bucket4j.local.SynchronizedBucket
 
getConsumed() - Method in class io.github.bucket4j.SimpleBucketListener
 
getData() - Method in class io.github.bucket4j.grid.CommandResult
 
getDelayedNanos() - Method in class io.github.bucket4j.SimpleBucketListener
 
getInterrupted() - Method in class io.github.bucket4j.SimpleBucketListener
 
getNanosToWaitForRefill() - Method in class io.github.bucket4j.ConsumptionProbe
Returns zero if ConsumptionProbe.isConsumed() returns true, else time in nanos which need to wait until requested amount of tokens will be refilled
getNewConfiguration() - Method in exception io.github.bucket4j.IncompatibleConfigurationException
 
getParkedNanos() - Method in class io.github.bucket4j.SimpleBucketListener
 
getPreviousConfiguration() - Method in exception io.github.bucket4j.IncompatibleConfigurationException
 
getProxy(K, BucketConfiguration) - Method in interface io.github.bucket4j.grid.ProxyManager
Provides light-weight proxy to bucket which actually stored outside current JVM.
getProxy(K, Supplier<BucketConfiguration>) - Method in interface io.github.bucket4j.grid.ProxyManager
Provides light-weight proxy to bucket which actually stored outside current JVM.
getProxy(K) - Method in interface io.github.bucket4j.grid.ProxyManager
Locates proxy to bucket which actually stored outside current JVM.
getProxyConfiguration(K) - Method in interface io.github.bucket4j.grid.ProxyManager
Locates configuration of bucket which actually stored outside current JVM.
getRejected() - Method in class io.github.bucket4j.SimpleBucketListener
 
getRemainingTokens() - Method in class io.github.bucket4j.ConsumptionProbe
Return the tokens remaining in the bucket
getState() - Method in class io.github.bucket4j.grid.GridBucketState
 
greedy(long, Duration) - Static method in class io.github.bucket4j.Refill
Creates the Refill that does refill of tokens in greedy manner, it will try to add the tokens to bucket as soon as possible.
GridBucket<K extends Serializable> - Class in io.github.bucket4j.grid
Represents the bucket which state actually stored outside current JVM.
GridBucketState - Class in io.github.bucket4j.grid
 
GridBucketState(BucketConfiguration, BucketState) - Constructor for class io.github.bucket4j.grid.GridBucketState
 
GridCommand<T extends Serializable> - Interface in io.github.bucket4j.grid
 
GridProxy<K extends Serializable> - Interface in io.github.bucket4j.grid
 

I

IncompatibleConfigurationException - Exception in io.github.bucket4j
 
IncompatibleConfigurationException(BucketConfiguration, BucketConfiguration) - Constructor for exception io.github.bucket4j.IncompatibleConfigurationException
 
INSTANCE - Static variable in class io.github.bucket4j.local.FakeLock
 
INSTANCE - Static variable in class io.github.bucket4j.Nothing
 
intervally(long, Duration) - Static method in class io.github.bucket4j.Refill
Creates the Refill that does refill of tokens in intervally manner.
io.github.bucket4j - package io.github.bucket4j
 
io.github.bucket4j.grid - package io.github.bucket4j.grid
 
io.github.bucket4j.local - package io.github.bucket4j.local
 
isAsyncModeSupported() - Method in interface io.github.bucket4j.Bucket
Describes whether or not this bucket supports asynchronous mode.
isAsyncModeSupported() - Method in class io.github.bucket4j.grid.GridBucket
 
isAsyncModeSupported() - Method in interface io.github.bucket4j.grid.GridProxy
 
isAsyncModeSupported() - Method in class io.github.bucket4j.local.LockFreeBucket
 
isAsyncModeSupported() - Method in class io.github.bucket4j.local.SynchronizedBucket
 
isBucketNotFound() - Method in class io.github.bucket4j.grid.CommandResult
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.AddTokensCommand
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.ConsumeAsMuchAsPossibleCommand
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.CreateSnapshotCommand
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.GetAvailableTokensCommand
 
isBucketStateModified() - Method in interface io.github.bucket4j.grid.GridCommand
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.ReplaceConfigurationOrReturnPreviousCommand
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.ReserveAndCalculateTimeToSleepCommand
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.TryConsumeAndReturnRemainingTokensCommand
 
isBucketStateModified() - Method in class io.github.bucket4j.grid.TryConsumeCommand
 
isCompatible(BucketConfiguration) - Method in class io.github.bucket4j.BucketConfiguration
 
isConsumed() - Method in class io.github.bucket4j.ConsumptionProbe
Flag describes result of consumption operation.

L

LocalBucket - Interface in io.github.bucket4j.local
Represents the bucket inside current JVM.
LocalBucketBuilder - Class in io.github.bucket4j.local
This builder creates in-memory buckets (LockFreeBucket).
LocalBucketBuilder() - Constructor for class io.github.bucket4j.local.LocalBucketBuilder
 
lock() - Method in class io.github.bucket4j.local.FakeLock
 
LockFreeBucket - Class in io.github.bucket4j.local
 
LockFreeBucket(BucketConfiguration, TimeMeter) - Constructor for class io.github.bucket4j.local.LockFreeBucket
 
lockInterruptibly() - Method in class io.github.bucket4j.local.FakeLock
 

N

newCondition() - Method in class io.github.bucket4j.local.FakeLock
 
nonPositiveCapacity(long) - Static method in class io.github.bucket4j.BucketExceptions
 
nonPositiveFixedRefillInterval(Duration) - Static method in class io.github.bucket4j.BucketExceptions
 
nonPositiveInitialTokens(long) - Static method in class io.github.bucket4j.BucketExceptions
 
nonPositiveNanosToWait(long) - Static method in class io.github.bucket4j.BucketExceptions
 
nonPositivePeriod(long) - Static method in class io.github.bucket4j.BucketExceptions
 
nonPositivePeriodTokens(long) - Static method in class io.github.bucket4j.BucketExceptions
 
nonPositiveTokensToConsume(long) - Static method in class io.github.bucket4j.BucketExceptions
 
NOPE - Static variable in interface io.github.bucket4j.BucketListener
The default listener that do nothing.
Nothing - Class in io.github.bucket4j
 
Nothing() - Constructor for class io.github.bucket4j.Nothing
 
nullBandwidth() - Static method in class io.github.bucket4j.BucketExceptions
 
nullBandwidthRefill() - Static method in class io.github.bucket4j.BucketExceptions
 
nullConfiguration() - Static method in class io.github.bucket4j.BucketExceptions
 
nullConfigurationSupplier() - Static method in class io.github.bucket4j.BucketExceptions
 
nullFixedRefillInterval() - Static method in class io.github.bucket4j.BucketExceptions
 
nullListener() - Static method in class io.github.bucket4j.BucketExceptions
 
nullRefillPeriod() - Static method in class io.github.bucket4j.BucketExceptions
 
nullScheduler() - Static method in class io.github.bucket4j.BucketExceptions
 
nullSynchronizationStrategy() - Static method in class io.github.bucket4j.BucketExceptions
 
nullTimeMeter() - Static method in class io.github.bucket4j.BucketExceptions
 

O

of(long, Duration) - Static method in class io.github.bucket4j.Refill
Deprecated.
onConsumed(long) - Method in interface io.github.bucket4j.BucketListener
This method is called whenever tokens is consumed.
onConsumed(long) - Method in class io.github.bucket4j.SimpleBucketListener
 
onDelayed(long) - Method in interface io.github.bucket4j.BucketListener
This method is called each time when delayed task was submit to ScheduledExecutorService because of wait for tokens refill in result of interaction with AsyncScheduledBucket
onDelayed(long) - Method in class io.github.bucket4j.SimpleBucketListener
 
onInterrupted(InterruptedException) - Method in interface io.github.bucket4j.BucketListener
This method is called each time when thread was interrupted during the wait of tokens refill in result of interaction with BlockingBucket
onInterrupted(InterruptedException) - Method in class io.github.bucket4j.SimpleBucketListener
 
onParked(long) - Method in interface io.github.bucket4j.BucketListener
This method is called each time when thread was parked for wait of tokens refill in result of interaction with BlockingBucket
onParked(long) - Method in class io.github.bucket4j.SimpleBucketListener
 
onRejected(long) - Method in interface io.github.bucket4j.BucketListener
This method is called whenever consumption request for tokens is rejected.
onRejected(long) - Method in class io.github.bucket4j.SimpleBucketListener
 

P

park(long) - Method in interface io.github.bucket4j.BlockingStrategy
Park current thread to required duration of nanoseconds.
PARKING - Static variable in interface io.github.bucket4j.BlockingStrategy
 
PARKING - Static variable in interface io.github.bucket4j.UninterruptibleBlockingStrategy
 
parkUninterruptibly(long) - Method in interface io.github.bucket4j.UninterruptibleBlockingStrategy
Parks current thread to required duration of nanoseconds ignoring all interrupts, if interrupt was happen then interruption flag will be restored on the current thread.
ProxyManager<K extends Serializable> - Interface in io.github.bucket4j.grid
Provides interface to instantiate an light-weight proxy to bucket which state actually stored in any external storage outside current JVM, like in-memory grid or relational database.

R

RecoveryStrategy - Enum in io.github.bucket4j.grid
Specifies the reaction which should be applied in case of previously saved state of bucket has been lost.
Refill - Class in io.github.bucket4j
Specifies the speed of tokens regeneration.
refillAllBandwidth(Bandwidth[], long) - Method in class io.github.bucket4j.BucketState
 
refillAllBandwidth(long) - Method in class io.github.bucket4j.grid.GridBucketState
 
rejected(long, long) - Static method in class io.github.bucket4j.ConsumptionProbe
 
replaceConfiguration(BucketConfiguration) - Method in class io.github.bucket4j.AbstractBucket
 
replaceConfiguration(BucketConfiguration) - Method in interface io.github.bucket4j.AsyncBucket
Asynchronous version of Bucket.replaceConfiguration(BucketConfiguration), follows the same rules and semantic.
replaceConfiguration(BucketConfiguration) - Method in interface io.github.bucket4j.Bucket
Replaces configuration of this bucket instance.
replaceConfigurationAsyncImpl(BucketConfiguration) - Method in class io.github.bucket4j.AbstractBucket
 
replaceConfigurationAsyncImpl(BucketConfiguration) - Method in class io.github.bucket4j.grid.GridBucket
 
replaceConfigurationAsyncImpl(BucketConfiguration) - Method in class io.github.bucket4j.local.LockFreeBucket
 
replaceConfigurationAsyncImpl(BucketConfiguration) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
replaceConfigurationImpl(BucketConfiguration) - Method in class io.github.bucket4j.AbstractBucket
 
replaceConfigurationImpl(BucketConfiguration) - Method in class io.github.bucket4j.grid.GridBucket
 
replaceConfigurationImpl(BucketConfiguration) - Method in class io.github.bucket4j.local.LockFreeBucket
 
replaceConfigurationImpl(BucketConfiguration) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
replaceConfigurationOrReturnPrevious(BucketConfiguration) - Method in class io.github.bucket4j.grid.GridBucketState
 
ReplaceConfigurationOrReturnPreviousCommand - Class in io.github.bucket4j.grid
 
ReplaceConfigurationOrReturnPreviousCommand(BucketConfiguration) - Constructor for class io.github.bucket4j.grid.ReplaceConfigurationOrReturnPreviousCommand
 
reserveAndCalculateTimeToSleepAsyncImpl(long, long) - Method in class io.github.bucket4j.AbstractBucket
 
reserveAndCalculateTimeToSleepAsyncImpl(long, long) - Method in class io.github.bucket4j.grid.GridBucket
 
reserveAndCalculateTimeToSleepAsyncImpl(long, long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
reserveAndCalculateTimeToSleepAsyncImpl(long, long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
ReserveAndCalculateTimeToSleepCommand - Class in io.github.bucket4j.grid
 
ReserveAndCalculateTimeToSleepCommand(long, long) - Constructor for class io.github.bucket4j.grid.ReserveAndCalculateTimeToSleepCommand
 
reserveAndCalculateTimeToSleepImpl(long, long) - Method in class io.github.bucket4j.AbstractBucket
 
reserveAndCalculateTimeToSleepImpl(long, long) - Method in class io.github.bucket4j.grid.GridBucket
 
reserveAndCalculateTimeToSleepImpl(long, long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
reserveAndCalculateTimeToSleepImpl(long, long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
restrictionsNotSpecified() - Static method in class io.github.bucket4j.BucketExceptions
 

S

simple(long, Duration) - Static method in class io.github.bucket4j.Bandwidth
Specifies simple limitation capacity tokens per period time window.
SimpleBucketListener - Class in io.github.bucket4j
 
SimpleBucketListener() - Constructor for class io.github.bucket4j.SimpleBucketListener
 
smooth(long, Duration) - Static method in class io.github.bucket4j.Refill
Deprecated.
success(R) - Static method in class io.github.bucket4j.grid.CommandResult
 
SynchronizationStrategy - Enum in io.github.bucket4j.local
Defines the strategy of synchronization which need to be applied to prevent data-races in multithreading usage scenario.
SynchronizedBucket - Class in io.github.bucket4j.local
 
SynchronizedBucket(BucketConfiguration, TimeMeter) - Constructor for class io.github.bucket4j.local.SynchronizedBucket
 
SYSTEM_MILLISECONDS - Static variable in interface io.github.bucket4j.TimeMeter
The implementation of TimeMeter which works around System.currentTimeMillis()
SYSTEM_NANOTIME - Static variable in interface io.github.bucket4j.TimeMeter
The implementation of TimeMeter which works around System.nanoTime()

T

TimeMeter - Interface in io.github.bucket4j
An abstraction over time measurement.
toListenable(BucketListener) - Method in interface io.github.bucket4j.Bucket
Returns new copy of this bucket instance decorated by listener.
toListenable(BucketListener) - Method in class io.github.bucket4j.grid.GridBucket
 
toListenable(BucketListener) - Method in class io.github.bucket4j.local.LockFreeBucket
 
toListenable(BucketListener) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
tooHighRefillRate(long, long) - Static method in class io.github.bucket4j.BucketExceptions
 
toString() - Method in class io.github.bucket4j.Bandwidth
 
toString() - Method in class io.github.bucket4j.BucketConfiguration
 
toString() - Method in class io.github.bucket4j.BucketState
 
toString() - Method in class io.github.bucket4j.ConfigurationBuilder
 
toString() - Method in class io.github.bucket4j.ConsumptionProbe
 
toString() - Method in class io.github.bucket4j.local.LockFreeBucket
 
toString() - Method in class io.github.bucket4j.local.SynchronizedBucket
 
toString() - Method in class io.github.bucket4j.Refill
 
tryConsume(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsume(long, long, BlockingStrategy) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsume(long) - Method in interface io.github.bucket4j.AsyncBucket
Asynchronous version of Bucket.tryConsume(long), follows the same semantic.
tryConsume(long, long, ScheduledExecutorService) - Method in interface io.github.bucket4j.AsyncScheduledBucket
Tries to consume the specified number of tokens from the bucket.
tryConsume(long, Duration, ScheduledExecutorService) - Method in interface io.github.bucket4j.AsyncScheduledBucket
tryConsume(long, long, BlockingStrategy) - Method in interface io.github.bucket4j.BlockingBucket
Tries to consume a specified number of tokens from the bucket.
tryConsume(long, Duration, BlockingStrategy) - Method in interface io.github.bucket4j.BlockingBucket
This is just overloaded equivalent of BlockingBucket.tryConsume(long, long, BlockingStrategy)
tryConsume(long, long) - Method in interface io.github.bucket4j.BlockingBucket
This is just overloaded equivalent of BlockingBucket.tryConsume(long, long, BlockingStrategy)
tryConsume(long, Duration) - Method in interface io.github.bucket4j.BlockingBucket
This is just overloaded equivalent of BlockingBucket.tryConsume(long, long, BlockingStrategy)
tryConsume(long) - Method in interface io.github.bucket4j.Bucket
Tries to consume a specified number of tokens from this bucket.
tryConsumeAndReturnRemaining(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeAndReturnRemaining(long) - Method in interface io.github.bucket4j.AsyncBucket
Asynchronous version of Bucket.tryConsumeAndReturnRemaining(long), follows the same semantic.
tryConsumeAndReturnRemaining(long) - Method in interface io.github.bucket4j.Bucket
Tries to consume a specified number of tokens from this bucket.
tryConsumeAndReturnRemainingTokensAsyncImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeAndReturnRemainingTokensAsyncImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
tryConsumeAndReturnRemainingTokensAsyncImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
tryConsumeAndReturnRemainingTokensAsyncImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
TryConsumeAndReturnRemainingTokensCommand - Class in io.github.bucket4j.grid
 
TryConsumeAndReturnRemainingTokensCommand(long) - Constructor for class io.github.bucket4j.grid.TryConsumeAndReturnRemainingTokensCommand
 
tryConsumeAndReturnRemainingTokensImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeAndReturnRemainingTokensImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
tryConsumeAndReturnRemainingTokensImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
tryConsumeAndReturnRemainingTokensImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
tryConsumeAsMuchAsPossible(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeAsMuchAsPossible() - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeAsMuchAsPossible() - Method in interface io.github.bucket4j.AsyncBucket
Asynchronous version of Bucket.tryConsumeAsMuchAsPossible(), follows the same semantic.
tryConsumeAsMuchAsPossible(long) - Method in interface io.github.bucket4j.AsyncBucket
Asynchronous version of Bucket.tryConsumeAsMuchAsPossible(long), follows the same semantic.
tryConsumeAsMuchAsPossible() - Method in interface io.github.bucket4j.Bucket
Tries to consume as much tokens from this bucket as available at the moment of invocation.
tryConsumeAsMuchAsPossible(long) - Method in interface io.github.bucket4j.Bucket
Tries to consume as much tokens from bucket as available in the bucket at the moment of invocation, but tokens which should be consumed is limited by limit.
tryConsumeAsMuchAsPossibleAsyncImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeAsMuchAsPossibleAsyncImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
tryConsumeAsMuchAsPossibleAsyncImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
tryConsumeAsMuchAsPossibleAsyncImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
tryConsumeAsyncImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeAsyncImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
tryConsumeAsyncImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
tryConsumeAsyncImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
TryConsumeCommand - Class in io.github.bucket4j.grid
 
TryConsumeCommand(long) - Constructor for class io.github.bucket4j.grid.TryConsumeCommand
 
tryConsumeImpl(long) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeImpl(long) - Method in class io.github.bucket4j.grid.GridBucket
 
tryConsumeImpl(long) - Method in class io.github.bucket4j.local.LockFreeBucket
 
tryConsumeImpl(long) - Method in class io.github.bucket4j.local.SynchronizedBucket
 
tryConsumeUninterruptibly(long, long, UninterruptibleBlockingStrategy) - Method in class io.github.bucket4j.AbstractBucket
 
tryConsumeUninterruptibly(long, long, UninterruptibleBlockingStrategy) - Method in interface io.github.bucket4j.BlockingBucket
Has same semantic with BlockingBucket.tryConsume(long, long, BlockingStrategy) but ignores interrupts(just restores interruption flag on exit).
tryConsumeUninterruptibly(long, Duration, UninterruptibleBlockingStrategy) - Method in interface io.github.bucket4j.BlockingBucket
tryConsumeUninterruptibly(long, long) - Method in interface io.github.bucket4j.BlockingBucket
tryConsumeUninterruptibly(long, Duration) - Method in interface io.github.bucket4j.BlockingBucket
tryLock() - Method in class io.github.bucket4j.local.FakeLock
 
tryLock(long, TimeUnit) - Method in class io.github.bucket4j.local.FakeLock
 

U

UninterruptibleBlockingStrategy - Interface in io.github.bucket4j
Specifies the way to block current thread to amount of time required to refill missed number of tokens in the bucket.
unlock() - Method in class io.github.bucket4j.local.FakeLock
 

V

valueOf(String) - Static method in enum io.github.bucket4j.grid.RecoveryStrategy
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum io.github.bucket4j.local.SynchronizationStrategy
Returns the enum constant of this type with the specified name.
values() - Static method in enum io.github.bucket4j.grid.RecoveryStrategy
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum io.github.bucket4j.local.SynchronizationStrategy
Returns an array containing the constants of this enum type, in the order they are declared.

W

withCustomTimePrecision(TimeMeter) - Method in class io.github.bucket4j.local.LocalBucketBuilder
Specifies customTimeMeter time meter for buckets that will be created by this builder.
withInitialTokens(long) - Method in class io.github.bucket4j.Bandwidth
By default new created bandwidth has amount tokens that equals its capacity.
withMillisecondPrecision() - Method in class io.github.bucket4j.local.LocalBucketBuilder
Specifies TimeMeter.SYSTEM_MILLISECONDS as time meter for buckets that will be created by this builder.
withNanosecondPrecision() - Method in class io.github.bucket4j.local.LocalBucketBuilder
Specifies TimeMeter.SYSTEM_NANOTIME as time meter for buckets that will be created by this builder.
withSynchronizationStrategy(SynchronizationStrategy) - Method in class io.github.bucket4j.local.LocalBucketBuilder
Specifies synchronizationStrategy for buckets that will be created by this builder.
A B C D E F G I L N O P R S T U V W 
Skip navigation links

Copyright © 2018. All rights reserved.