Class ExpirableReferences


  • public class ExpirableReferences
    extends Object
    • 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 the Duration variant instead
        Returns a ResettableLazyReference. 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 the Duration variant instead
        Returns a ResettableLazyReference 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 a ResettableLazyReference. 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 a ResettableLazyReference that will automatically close() the referenced object when it's expired}