|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.cache.value.AbstractStatelessTimestampedValue<V>
public abstract class AbstractStatelessTimestampedValue<V>
| Field Summary | |
|---|---|
protected static int |
UNUSED
Indicates the TTI or TTL is UNUSED (0). |
| Fields inherited from interface org.terracotta.cache.TimestampedValue |
|---|
NEVER_EXPIRE |
| Constructor Summary | |
|---|---|
AbstractStatelessTimestampedValue()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compare whether the value in this entry equals the value in another entry. |
int |
expiresAt(CacheConfig config)
Get the time at which this timestamp will become invalid. |
protected abstract CapacityEvictionPolicyData |
fastGetCapacityEvictionPolicyData()
|
abstract int |
getCreateTime()
Retrieves the time when this value was created. |
abstract int |
getLastAccessedTime()
Retrieves the time when this value was last accessed. |
abstract V |
getValue()
Get the actual value in the cache. |
int |
hashCode()
|
boolean |
isExpired(int atTime,
CacheConfig config)
Determine whether this timestamp is expired at the specified time. |
void |
markUsed(int usedAtTime,
String lockId,
CacheConfig config)
Mark this timestamp as being used and reset the idle timer (if in use). |
protected abstract void |
setLastAccessedTimeInternal(int usedAtTime)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.terracotta.cache.TimestampedValue |
|---|
getCapacityEvictionPolicyData, setCapacityEvictionPolicyData |
| Field Detail |
|---|
protected static final int UNUSED
| Constructor Detail |
|---|
public AbstractStatelessTimestampedValue()
| Method Detail |
|---|
protected abstract CapacityEvictionPolicyData fastGetCapacityEvictionPolicyData()
public abstract V getValue()
TimestampedValue
getValue in interface TimestampedValue<V>
public final void markUsed(int usedAtTime,
String lockId,
CacheConfig config)
markUsed in interface TimestampedValue<V>usedAtTime - Mark used at this timelockId - The lock string guarding this value, such as would be obtained by calling the underlying
ConcurrentDistributedMap.getLockIdForKey() methodconfig - The cache configurationpublic abstract int getLastAccessedTime()
TimestampedValue
getLastAccessedTime in interface TimestampedValue<V>protected abstract void setLastAccessedTimeInternal(int usedAtTime)
public final boolean isExpired(int atTime,
CacheConfig config)
isExpired in interface TimestampedValue<V>atTime - Usually the current time, in seconds since the epochconfig - The cache configuration
public int expiresAt(CacheConfig config)
TimestampedValue.NEVER_EXPIRE.
expiresAt in interface TimestampedValue<V>config - The configuration
public abstract int getCreateTime()
TimestampedValue
getCreateTime in interface TimestampedValue<V>public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||