Class ExpiryHandlerImpl
java.lang.Object
com.atlassian.bamboo.utils.expirables.ExpiryHandlerImpl
- All Implemented Interfaces:
ExpiryHandler
-
Constructor Summary
ConstructorDescriptionExpiryHandlerImpl
(@NotNull Expirable expiring, @NotNull BambooTimeValue timeToIdle, @NotNull ExpiryTicker expiryTicker) Deprecated.ExpiryHandlerImpl
(@NotNull Expirable expiring, @NotNull Duration timeToIdle, @NotNull ExpiryTicker expiryTicker) -
Method Summary
Modifier and TypeMethodDescriptionlong
Called periodically byExpiryTicker
.void
onCreate()
Called when an expirable object is created/recreated.void
onUse()
Called when an expirable object is used.
-
Constructor Details
-
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 Details
-
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.
-
Duration
variant instead