Wrapper for a value inside a cache that adds timestamp information for expiration and prevents "cache storms" with a Lock. JMM happens-before is ensured with AtomicReference. Objects in cache are assumed to not change after publication.
Constructor and description |
---|
CacheEntry
(java.lang.Object value) |
Type | Name and description |
---|---|
java.lang.Object |
getValue(long timeout, java.security.PrivilegedAction<T> updater) |
Methods inherited from class | Name |
---|---|
class CacheEntry |
expire, getCreatedMillis, getValue, getValue, getValue, getValue, getValue, getValue, getValueWhileUpdating, hasExpired, isInitialized, resetTimestamp, setInitialized, setValue, shouldUpdate, updateValue |