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