| Package | Description |
|---|---|
| io.github.bucket4j.distributed |
| Modifier and Type | Method and Description |
|---|---|
static ExpirationAfterWriteStrategy |
ExpirationAfterWriteStrategy.basedOnTimeForRefillingBucketUpToMax(Duration keepAfterRefillDuration)
Returns strategy that smartly calculates TTL based of current bucket state,
buckets are not persisted in storage longer than time required to refill all consumed tokens plus keepAfterRefillDuration
|
static ExpirationAfterWriteStrategy |
ExpirationAfterWriteStrategy.fixedTimeToLive(Duration ttl)
Returns strategy that makes to store buckets with fixed TTL.
|
static ExpirationAfterWriteStrategy |
ExpirationAfterWriteStrategy.none()
Returns strategy that makes to store buckets forever.
|
Copyright © 2022. All rights reserved.