Expiration. It will invalidate
objects based on about how long ago they were allocated.
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final long | |
| private final TimeUnit |
| Access | Constructor and Description |
|---|---|
| pack-priv | TimeSpreadExpiration(long
Poolables younger than this, in the given unit, are not
considered expired. This value must be at least 1. lowerBound, long Poolables older than this, in the given unit, are always
considered expired. This value must be greater than the
lowerBound. upperBound, TimeUnit The unit)TimeUnit of the bounds values. Never `null`.Construct a new Expiration that will invalidate objects that are older than the given lower bound, before they get older than the upper bound, in the given time unit. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv long | |
| public boolean | hasExpired(SlotInfo<? extends T>
An informative representative of the slot being tested.
Never `null`. info)Implements stormpot. stormpot. represented by the given SlotInfo is
older than the lower bound, eventually returning `true` with
100% certainty when the age of the Poolable is equal to or greater than
the upper bound.
|
| public String | toString()
Overrides java. |
| fromMillis | back to summary |
|---|---|
| private final long fromMillis | |
| toMillis | back to summary |
|---|---|
| private final long toMillis | |
| unit | back to summary |
|---|---|
| private final TimeUnit unit | |
| TimeSpreadExpiration | back to summary |
|---|---|
| pack-priv TimeSpreadExpiration(long lowerBound, long upperBound, TimeUnit unit) Construct a new Expiration that will invalidate objects that are older
than the given lower bound, before they get older than the upper bound,
in the given time unit.
If the `lowerBound` is less than 1, the `upperBound` is less than the
`lowerBound`, or the `unit` is `null`, then an
| |
| computeExpirationDeadline | back to summary |
|---|---|
| pack-priv long computeExpirationDeadline() | |
| hasExpired | back to summary |
|---|---|
| public boolean hasExpired(SlotInfo<? extends T> info) Implements stormpot. Returns `true`, with uniformly increasing probability, if the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Produces a String representation of this TimeSpreadExpiration.
| |