Package com.atlassian.bamboo.expirables
Interface ExpiryHandler
- All Known Implementing Classes:
ExpiryHandlerImpl
,GuavaCacheLazyExpiryHandler
,LazyExpiryHandler
public interface ExpiryHandler
Interface used to keeps tabs/control an expirable element.
-
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.
-
Method Details
-
onCreate
void onCreate()Called when an expirable object is created/recreated. -
onUse
void onUse()Called when an expirable object is used. -
expiryTick
long expiryTick()Called periodically byExpiryTicker
. Should be used to expire the object if it's too old.- 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.
-