org.terracotta.cache.value
Class AbstractTimestampedValue<V>
java.lang.Object
org.terracotta.cache.value.AbstractStatelessTimestampedValue<V>
org.terracotta.cache.value.AbstractTimestampedValue<V>
- All Implemented Interfaces:
- ExpirableEntry, MarkTimestampedValue, TimestampedValue<V>
- Direct Known Subclasses:
- DefaultTimestampedValue, SerializedEntry
public abstract class AbstractTimestampedValue<V>
- extends AbstractStatelessTimestampedValue<V>
Abstract base class for timestamped map entries. This class defines the timestamp manipulation logic and locking that
should be common for all entries
|
Field Summary |
protected int |
lastAccessedTime
Last time when this item was used guarded by synchronized(this) with terracotta auto-locks time is seconds since
the epoch (System.currentTimeMillis() / 1000) for example) |
lastAccessedTime
protected volatile int lastAccessedTime
- Last time when this item was used guarded by synchronized(this) with terracotta auto-locks time is seconds since
the epoch (System.currentTimeMillis() / 1000) for example)
AbstractTimestampedValue
protected AbstractTimestampedValue()
setCapacityEvictionPolicyData
public void setCapacityEvictionPolicyData(CapacityEvictionPolicyData capacityEvictionPolicy)
- Description copied from interface:
TimestampedValue
- Sets this value's capacity eviction policy data.
- Parameters:
capacityEvictionPolicy - the new data
getCapacityEvictionPolicyData
public CapacityEvictionPolicyData getCapacityEvictionPolicyData()
- Description copied from interface:
TimestampedValue
- Retrieves this value's capacity eviction policy data.
- Returns:
- this value's data
fastGetCapacityEvictionPolicyData
protected final CapacityEvictionPolicyData fastGetCapacityEvictionPolicyData()
- Specified by:
fastGetCapacityEvictionPolicyData in class AbstractStatelessTimestampedValue<V>
getLastAccessedTime
public int getLastAccessedTime()
- Description copied from interface:
TimestampedValue
- Retrieves the time when this value was last accessed.
- Specified by:
getLastAccessedTime in interface TimestampedValue<V>- Specified by:
getLastAccessedTime in class AbstractStatelessTimestampedValue<V>
- Returns:
- this value's last access time in seconds since epoch
setLastAccessedTimeInternal
protected void setLastAccessedTimeInternal(int usedAtTime)
- Specified by:
setLastAccessedTimeInternal in class AbstractStatelessTimestampedValue<V>
Copyright © 2015 Terracotta, Inc.. All Rights Reserved.