Skip navigation links
B C F G O R S T W 

B

build() - Method in class org.isomorphism.util.TokenBuckets.Builder
Build the token bucket.
builder() - Static method in class org.isomorphism.util.TokenBuckets
Create a new builder for token buckets.
Builder() - Constructor for class org.isomorphism.util.TokenBuckets.Builder
 

C

consume() - Method in interface org.isomorphism.util.TokenBucket
Consume a single token from the bucket.
consume(long) - Method in interface org.isomorphism.util.TokenBucket
Consumes multiple tokens from the bucket.

F

FixedIntervalRefillStrategy - Class in org.isomorphism.util
A token bucket refill strategy that will provide N tokens for a token bucket to consume every T units of time.
FixedIntervalRefillStrategy(Ticker, long, long, TimeUnit) - Constructor for class org.isomorphism.util.FixedIntervalRefillStrategy
Create a FixedIntervalRefillStrategy.

G

getCapacity() - Method in interface org.isomorphism.util.TokenBucket
Returns the capacity of this token bucket.
getDurationUntilNextRefill(TimeUnit) - Method in class org.isomorphism.util.FixedIntervalRefillStrategy
 
getDurationUntilNextRefill(TimeUnit) - Method in interface org.isomorphism.util.TokenBucket
Returns the amount of time in the specified time unit until the next group of tokens can be added to the token bucket.
getDurationUntilNextRefill(TimeUnit) - Method in interface org.isomorphism.util.TokenBucket.RefillStrategy
Returns the amount of time in the specified time unit until the next group of tokens can be added to the token bucket.
getNumTokens() - Method in interface org.isomorphism.util.TokenBucket
Returns the current number of tokens in the bucket.

O

org.isomorphism.util - package org.isomorphism.util
 

R

refill() - Method in class org.isomorphism.util.FixedIntervalRefillStrategy
 
refill(long) - Method in interface org.isomorphism.util.TokenBucket
Refills the bucket with the specified number of tokens.
refill() - Method in interface org.isomorphism.util.TokenBucket.RefillStrategy
Returns the number of tokens to add to the token bucket.

S

sleep() - Method in interface org.isomorphism.util.TokenBucket.SleepStrategy
Sleep for a short period of time to allow other threads and system processes to execute.

T

TokenBucket - Interface in org.isomorphism.util
A token bucket is used for rate limiting access to a portion of code.
TokenBucket.RefillStrategy - Interface in org.isomorphism.util
Encapsulation of a refilling strategy for a token bucket.
TokenBucket.SleepStrategy - Interface in org.isomorphism.util
Encapsulation of a strategy for relinquishing control of the CPU.
TokenBuckets - Class in org.isomorphism.util
Static utility methods pertaining to creating TokenBucketImpl instances.
TokenBuckets.Builder - Class in org.isomorphism.util
 
tryConsume() - Method in interface org.isomorphism.util.TokenBucket
Attempt to consume a single token from the bucket.
tryConsume(long) - Method in interface org.isomorphism.util.TokenBucket
Attempt to consume a specified number of tokens from the bucket.

W

withBusyWaitSleepStrategy() - Method in class org.isomorphism.util.TokenBuckets.Builder
Use a sleep strategy that will not yield the CPU to other processes.
withCapacity(long) - Method in class org.isomorphism.util.TokenBuckets.Builder
Specify the overall capacity of the token bucket.
withFixedIntervalRefillStrategy(long, long, TimeUnit) - Method in class org.isomorphism.util.TokenBuckets.Builder
Refill tokens at a fixed interval.
withInitialTokens(long) - Method in class org.isomorphism.util.TokenBuckets.Builder
Initialize the token bucket with a specific number of tokens.
withRefillStrategy(TokenBucket.RefillStrategy) - Method in class org.isomorphism.util.TokenBuckets.Builder
Use a user defined refill strategy.
withSleepStrategy(TokenBucket.SleepStrategy) - Method in class org.isomorphism.util.TokenBuckets.Builder
Use a user defined sleep strategy.
withYieldingSleepStrategy() - Method in class org.isomorphism.util.TokenBuckets.Builder
Use a sleep strategy that will always attempt to yield the CPU to other processes.
B C F G O R S T W 
Skip navigation links

Copyright © 2015. All Rights Reserved.