Class ExpiryHandlerImpl
- java.lang.Object
-
- com.atlassian.bamboo.utils.expirables.ExpiryHandlerImpl
-
- All Implemented Interfaces:
ExpiryHandler
public final class ExpiryHandlerImpl extends Object implements ExpiryHandler
-
-
Constructor Summary
Constructors Constructor Description ExpiryHandlerImpl(@NotNull Expirable expiring, @NotNull BambooTimeValue timeToIdle, @NotNull ExpiryTicker expiryTicker)
Deprecated.since 6.3 use theDuration
variant insteadExpiryHandlerImpl(@NotNull Expirable expiring, @NotNull Duration timeToIdle, @NotNull ExpiryTicker expiryTicker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
expiryTick()
Called periodically byExpiryTicker
.void
onCreate()
Called when an expirable object is created/recreated.void
onUse()
Called when an expirable object is used.
-
-
-
Constructor Detail
-
ExpiryHandlerImpl
@Deprecated public ExpiryHandlerImpl(@NotNull @NotNull Expirable expiring, @NotNull @NotNull BambooTimeValue timeToIdle, @NotNull @NotNull ExpiryTicker expiryTicker)
Deprecated.since 6.3 use theDuration
variant instead
-
ExpiryHandlerImpl
public ExpiryHandlerImpl(@NotNull @NotNull Expirable expiring, @NotNull @NotNull Duration timeToIdle, @NotNull @NotNull ExpiryTicker expiryTicker)
-
-
Method Detail
-
onCreate
public void onCreate()
Description copied from interface:ExpiryHandler
Called when an expirable object is created/recreated.- Specified by:
onCreate
in interfaceExpiryHandler
-
onUse
public void onUse()
Description copied from interface:ExpiryHandler
Called when an expirable object is used.- Specified by:
onUse
in interfaceExpiryHandler
-
expiryTick
public long expiryTick()
Description copied from interface:ExpiryHandler
Called periodically byExpiryTicker
. Should be used to expire the object if it's too old.- Specified by:
expiryTick
in interfaceExpiryHandler
- Returns:
- -1 if the object has been expired. 0 if it has not been expired. Optionally, can return the nearest timestamp when the object may be expired.
-
-