Liking cljdoc? Tell your friends :D

fr33m0nk.clj-bucket4j


bucket-builderclj

(bucket-builder)

returns new builder instance for customizing Bucket

returns new builder instance for customizing Bucket
sourceraw docstring

bucket-configuration-builderclj

(bucket-configuration-builder)

returns new Bucket Configuration Builder instance for customizing Bucket Configuration

returns new Bucket Configuration Builder instance for customizing Bucket Configuration
sourceraw docstring

classic-bandwidthclj

(classic-bandwidth capacity refill)
(classic-bandwidth capacity refill id)
(classic-bandwidth capacity refill id initial-token-count)
source

IBlockingBucketcljprotocol

consume-blocking-bucketclj

(consume-blocking-bucket blocking-bucket token-quantity)
(consume-blocking-bucket blocking-bucket token-quantity blocking-strategy)

Consumes a specified number of tokens from the bucket

Consumes a specified number of tokens from the bucket

consume-blocking-bucket-uninterruptiblyclj

(consume-blocking-bucket-uninterruptibly blocking-bucket
                                         token-quantity
                                         max-wait-time-ms)
(consume-blocking-bucket-uninterruptibly blocking-bucket
                                         token-quantity
                                         max-wait-time-ms
                                         uninterruptible-blocking-strategy)

Has same semantic with {@link #(consume-blocking-bucket token-quantity blocking-strategy)} but ignores interrupts(just restores interruption flag on exit)

Has same semantic with {@link #(consume-blocking-bucket token-quantity blocking-strategy)} but ignores interrupts(just restores interruption flag on exit)

try-consume-blocking-bucketclj

(try-consume-blocking-bucket blocking-bucket token-quantity max-wait-time-ms)
(try-consume-blocking-bucket blocking-or-scheduling-bucket
                             token-quantity
                             max-wait-time-ms
                             blocking-strategy)

Tries to consume a specified number of tokens from the bucket

Tries to consume a specified number of tokens from the bucket

try-consume-blocking-bucket-uninterruptiblyclj

(try-consume-blocking-bucket-uninterruptibly blocking-bucket
                                             token-quantity
                                             max-wait-time-ms)
(try-consume-blocking-bucket-uninterruptibly blocking-bucket
                                             token-quantity
                                             max-wait-time-ms
                                             uninterruptible-blocking-strategy)

Has same semantic with {@link (try-consume-blocking-bucket token-quantity, max-wait-time-ms, blocking-strategy)} but ignores interrupts(just restores interruption flag on exit)

Has same semantic with {@link (try-consume-blocking-bucket token-quantity, max-wait-time-ms, blocking-strategy)} but ignores interrupts(just restores interruption flag on exit)
source

IBucketcljprotocol

consume-ignoring-rate-limitsclj

(consume-ignoring-rate-limits bucket token-quantity)

Consumes {@code token-quantity} from bucket ignoring all limits

Consumes {@code token-quantity} from bucket ignoring all limits

as-blockingclj

(as-blocking bucket)

Returns the blocking API for this bucket, that provides operations which are able to block caller thread in case of lack of tokens

Returns the blocking API for this bucket, that provides operations which are able to block caller thread in case of lack of tokens

estimate-ability-to-consumeclj

(estimate-ability-to-consume bucket token-quantity)

Estimates ability to consume a specified number of tokens

Estimates ability to consume a specified number of tokens

as-schedulerclj

(as-scheduler bucket)

Returns the Scheduler API for this bucket

Returns the Scheduler API for this bucket

try-consumeclj

(try-consume bucket token-quantity)

Tries to consume a specified number of tokens from this bucket

Tries to consume a specified number of tokens from this bucket

try-consuming-and-return-remainingclj

(try-consuming-and-return-remaining bucket token-quantity)

Tries to consume a specified number of tokens from this bucket

Tries to consume a specified number of tokens from this bucket

force-add-tokensclj

(force-add-tokens bucket token-quantity)

Add <tt>token-quantity</tt> to bucket. In opposite to {@link #(add-tokens long)} usage of this method can lead to overflow bucket capacity.

Add <tt>token-quantity</tt> to bucket. In opposite to {@link #(add-tokens long)} usage of this method can lead to overflow bucket capacity.

try-consume-as-much-as-possibleclj

(try-consume-as-much-as-possible bucket)
(try-consume-as-much-as-possible bucket token-quantity)

Tries to consume as many tokens from this bucket as available at the moment of invocation Returns number of tokens which have been consumed, or zero if nothing was consumed

Tries to consume as many tokens from this bucket as available at the moment of invocation
Returns number of tokens which have been consumed, or zero if nothing was consumed

resetclj

(reset bucket)

Reset all tokens up to maximum capacity

Reset all tokens up to maximum capacity

get-available-token-countclj

(get-available-token-count bucket)

Returns the amount of available tokens in this bucket

Returns the amount of available tokens in this bucket

block-and-consumeclj

(block-and-consume bucket token-quantity)

Tries to consume a specified number using blocking API

Tries to consume a specified number using blocking API

as-verboseclj

(as-verbose bucket)

Returns the Verbose API for this bucket

Returns the Verbose API for this bucket

add-tokensclj

(add-tokens bucket token-quantity)

Add <tt>token-quantity</tt> to bucket.

Add <tt>token-quantity</tt> to bucket.
source

IBucketBuildercljprotocol

add-limitclj

(add-limit bucket-builder bandwidth)

Adds limit to Builder object of LocalBucketBuilder or ConfigurationBuilder

Adds limit to Builder object of LocalBucketBuilder or ConfigurationBuilder

with-custom-time-precisionclj

(with-custom-time-precision bucket-builder custom-time-meter)

Sets custom time precision for Builder object of LocalBucketBuilder using supplied TimeMeter object

Sets custom time precision for Builder object of LocalBucketBuilder using supplied TimeMeter object

with-milli-second-precisionclj

(with-milli-second-precision bucket-builder)

Sets millisecond precision for Builder object of LocalBucketBuilder

Sets millisecond precision for Builder object of LocalBucketBuilder

with-nano-second-precisionclj

(with-nano-second-precision bucket-builder)

Sets nanosecond precision for Builder object of LocalBucketBuilder

Sets nanosecond precision for Builder object of LocalBucketBuilder

with-synchronization-strategyclj

(with-synchronization-strategy bucket-builder synchronization-strategy)

Sets Synchronization for Builder object of LocalBucketBuilder using supplied SynchronizationStrategy object

Sets Synchronization for Builder object of LocalBucketBuilder using supplied SynchronizationStrategy object
source

IBuildercljprotocol

buildclj

(build bucket-builder)
(build remote-bucket-builder key bucket-configuration-or-supplier)

Builds builder instance to concrete object

Builds builder instance to concrete object
source

ICompareAndSwapBasedProxyManagercljprotocol

get-proxy-configurationclj

(get-proxy-configuration proxy-manager bucket-key)

Returns BucketConfiguration for provided key from AbstractCompareAndSwapBasedProxyManager

Returns BucketConfiguration for provided key from AbstractCompareAndSwapBasedProxyManager

get-remote-bucket-builderclj

(get-remote-bucket-builder proxy-manager)

Returns RemoteBucketBuilder instance from AbstractCompareAndSwapBasedProxyManager

Returns RemoteBucketBuilder instance from AbstractCompareAndSwapBasedProxyManager
source

IConsumptionProbecljprotocol

consumed?clj

(consumed? consumption-probe)

Returns Boolean from ConsumptionProbe indicating whether consumption was a success

Returns Boolean from ConsumptionProbe indicating whether consumption was a success

get-nanos-to-wait-for-refillclj

(get-nanos-to-wait-for-refill consumption-probe)

Returns Nano seconds to wait from ConsumptionProbe for a complete refill

Returns Nano seconds to wait from ConsumptionProbe for a complete refill

get-nanos-to-wait-for-resetclj

(get-nanos-to-wait-for-reset consumption-probe)

Returns Nano seconds to wait from ConsumptionProbe for a complete reset

Returns Nano seconds to wait from ConsumptionProbe for a complete reset

get-remaining-tokensclj

(get-remaining-tokens consumption-probe)

Returns remaining tokens from ConsumptionProbe after consumption

Returns remaining tokens from ConsumptionProbe after consumption
source

IRemoteBucketBuildercljprotocol

with-implicit-configuration-replacementclj

(with-implicit-configuration-replacement remote-bucket-builder
                                         desired-configuration-revision
                                         token-inheritance-strategy)

Configuration replacement strategy for RemoteBucketBuilder

Configuration replacement strategy for RemoteBucketBuilder

with-optimizationclj

(with-optimization remote-bucket-builder optimization)

Optimization strategy for RemoteBucketBuilder

Optimization strategy for RemoteBucketBuilder

with-recovery-strategyclj

(with-recovery-strategy remote-bucket-builder recovery-strategy)

Recovery strategy for RemoteBucketBuilder

Recovery strategy for RemoteBucketBuilder
source

ISchedulingBucketcljprotocol

consume-scheduling-bucketclj

(consume-scheduling-bucket scheduling-bucket token-quantity scheduler)

Consumes the specified number of tokens from the bucket

Consumes the specified number of tokens from the bucket

try-consume-scheduling-bucketclj

(try-consume-scheduling-bucket scheduling-bucket
                               token-quantity
                               max-wait-time-ms
                               scheduler)

Tries to consume the specified number of tokens from the bucket

Tries to consume the specified number of tokens from the bucket
source

IVerboseResultcljprotocol

get-configurationclj

(get-configuration verbose-result)

BucketConfiguration Object from VerboseResult

BucketConfiguration Object from VerboseResult

get-diagnosticsclj

(get-diagnostics verbose-result)

Diagnostics map from VerboseResult

Diagnostics map from VerboseResult

get-operation-time-nanosclj

(get-operation-time-nanos verbose-result)

Operation time from VerboseResult

Operation time from VerboseResult

get-stateclj

(get-state verbose-result)

BucketState Object from VerboseResult

BucketState Object from VerboseResult

get-valueclj

(get-value verbose-result)

Value from VerboseResult

Value from VerboseResult

get-verbose-result-mapclj

(get-verbose-result-map verbose-result)

VerboseResult as a map

VerboseResult as a map
source

refill-greedyclj

(refill-greedy token-quantity interval-ms)
source

refill-intervallyclj

(refill-intervally token-quantity interval-ms)
source

refill-intervally-alignedclj

(refill-intervally-aligned token-quantity
                           interval-ms
                           time-of-first-refill
                           use-adaptive-initial-tokens?)
source

simple-bandwidthclj

(simple-bandwidth capacity interval-ms)
(simple-bandwidth capacity interval-ms id)
(simple-bandwidth capacity interval-ms id initial-token-count)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close