Class ExpirableReferences
- java.lang.Object
-
- com.atlassian.bamboo.utils.expirables.ExpirableReferences
-
public class ExpirableReferences extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> com.atlassian.util.concurrent.ResettableLazyReference<T>
expirable(@NotNull Supplier<T> supplier, @NotNull BambooTimeValue timeToIdle, @NotNull ExpiryTicker expiryTicker)
Deprecated.since 6.3 use theDuration
variant insteadstatic <T> com.atlassian.util.concurrent.ResettableLazyReference<T>
expirable(@NotNull Supplier<T> supplier, @NotNull Duration timeToIdle, @NotNull ExpiryTicker expiryTicker)
Returns aResettableLazyReference
.static <T extends Closeable>
com.atlassian.util.concurrent.ResettableLazyReference<T>expirableWithClose(@NotNull Supplier<T> supplier, @NotNull BambooTimeValue timeToIdle, @NotNull ExpiryTicker expiryTicker)
Deprecated.since 6.3 use theDuration
variant insteadstatic <T extends Closeable>
com.atlassian.util.concurrent.ResettableLazyReference<T>expirableWithClose(@NotNull Supplier<T> supplier, @NotNull Duration timeToIdle, @NotNull ExpiryTicker expiryTicker)
Returns aResettableLazyReference
that will automatically close() the referenced object when it's expired}
-
-
-
Method Detail
-
expirable
@Deprecated public static <T> com.atlassian.util.concurrent.ResettableLazyReference<T> expirable(@NotNull @NotNull Supplier<T> supplier, @NotNull @NotNull BambooTimeValue timeToIdle, @NotNull @NotNull ExpiryTicker expiryTicker)
Deprecated.since 6.3 use theDuration
variant insteadReturns aResettableLazyReference
. The reference will support expiry if expiryTicker is not null. Otherwise it will be a plain resettable reference.
-
expirableWithClose
@Deprecated public static <T extends Closeable> com.atlassian.util.concurrent.ResettableLazyReference<T> expirableWithClose(@NotNull @NotNull Supplier<T> supplier, @NotNull @NotNull BambooTimeValue timeToIdle, @NotNull @NotNull ExpiryTicker expiryTicker)
Deprecated.since 6.3 use theDuration
variant insteadReturns aResettableLazyReference
that will automatically close() the referenced object when it's expired}
-
expirable
public static <T> com.atlassian.util.concurrent.ResettableLazyReference<T> expirable(@NotNull @NotNull Supplier<T> supplier, @NotNull @NotNull Duration timeToIdle, @NotNull @NotNull ExpiryTicker expiryTicker)
Returns aResettableLazyReference
. The reference will support expiry if expiryTicker is not null. Otherwise it will be a plain resettable reference.
-
expirableWithClose
public static <T extends Closeable> com.atlassian.util.concurrent.ResettableLazyReference<T> expirableWithClose(@NotNull @NotNull Supplier<T> supplier, @NotNull @NotNull Duration timeToIdle, @NotNull @NotNull ExpiryTicker expiryTicker)
Returns aResettableLazyReference
that will automatically close() the referenced object when it's expired}
-
-