Class GuavaCacheLazyExpiryHandler
java.lang.Object
com.atlassian.bamboo.utils.expirables.LazyExpiryHandler
com.atlassian.bamboo.utils.expirables.GuavaCacheLazyExpiryHandler
- All Implemented Interfaces:
ExpiryHandler
Expirable guava caches are expired on access. This handler can be used to trigger expiry.
-
Constructor Summary
-
Method Summary
Methods inherited from class com.atlassian.bamboo.utils.expirables.LazyExpiryHandler
onCreate, onUse
-
Constructor Details
-
GuavaCacheLazyExpiryHandler
public GuavaCacheLazyExpiryHandler(com.google.common.cache.Cache<?, ?> cache)
-
-
Method Details
-
expiryTick
public long expiryTick()Description copied from interface:ExpiryHandler
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.
-