public class ExpirableReferences extends Object
Modifier and Type | Method and Description |
---|---|
static <T> com.atlassian.util.concurrent.ResettableLazyReference<T> |
expirable(Supplier<T> supplier,
BambooTimeValue timeToIdle,
ExpiryTicker expiryTicker)
Deprecated.
since 6.3 use the
Duration variant instead |
static <T> com.atlassian.util.concurrent.ResettableLazyReference<T> |
expirable(Supplier<T> supplier,
Duration timeToIdle,
ExpiryTicker expiryTicker)
Returns a
ResettableLazyReference . |
static <T extends Closeable> |
expirableWithClose(Supplier<T> supplier,
BambooTimeValue timeToIdle,
ExpiryTicker expiryTicker)
Deprecated.
since 6.3 use the
Duration variant instead |
static <T extends Closeable> |
expirableWithClose(Supplier<T> supplier,
Duration timeToIdle,
ExpiryTicker expiryTicker)
Returns a
ResettableLazyReference that will automatically close() the referenced object when it's expired} |
@Deprecated public static <T> com.atlassian.util.concurrent.ResettableLazyReference<T> expirable(@NotNull Supplier<T> supplier, @NotNull BambooTimeValue timeToIdle, @NotNull ExpiryTicker expiryTicker)
Duration
variant insteadResettableLazyReference
. The reference will support expiry if expiryTicker is not null. Otherwise
it will be a plain resettable reference.@Deprecated public static <T extends Closeable> com.atlassian.util.concurrent.ResettableLazyReference<T> expirableWithClose(@NotNull Supplier<T> supplier, @NotNull BambooTimeValue timeToIdle, @NotNull ExpiryTicker expiryTicker)
Duration
variant insteadResettableLazyReference
that will automatically close() the referenced object when it's expired}public static <T> com.atlassian.util.concurrent.ResettableLazyReference<T> expirable(@NotNull Supplier<T> supplier, @NotNull Duration timeToIdle, @NotNull ExpiryTicker expiryTicker)
ResettableLazyReference
. The reference will support expiry if expiryTicker is not null. Otherwise
it will be a plain resettable reference.public static <T extends Closeable> com.atlassian.util.concurrent.ResettableLazyReference<T> expirableWithClose(@NotNull Supplier<T> supplier, @NotNull Duration timeToIdle, @NotNull ExpiryTicker expiryTicker)
ResettableLazyReference
that will automatically close() the referenced object when it's expired}Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.