org.terracotta.cache.value
Class DefaultTimestampedValue<V>
java.lang.Object
org.terracotta.cache.value.AbstractStatelessTimestampedValue<V>
org.terracotta.cache.value.AbstractTimestampedValue<V>
org.terracotta.cache.value.DefaultTimestampedValue<V>
- All Implemented Interfaces:
- TimestampedValue<V>
public class DefaultTimestampedValue<V>
- extends AbstractTimestampedValue<V>
Wraps a value in the map-evictor and adds an expiration timestamp for entries. Tracks timestamp information on when
the idle and TTL timers for a CacheData value will expire. The TTL timer (timeToDie) cannot be reset, but may not be
active. The idle timer is reset each time the item is used.
|
Method Summary |
int |
getCreateTime()
Retrieves the time when this value was created. |
V |
getValue()
Get the actual value in the cache. |
DefaultTimestampedValue
public DefaultTimestampedValue(V value,
int createTime)
getValue
public final V getValue()
- Description copied from interface:
TimestampedValue
- Get the actual value in the cache.
- Specified by:
getValue in interface TimestampedValue<V>- Specified by:
getValue in class AbstractStatelessTimestampedValue<V>
- Returns:
- The value
getCreateTime
public int getCreateTime()
- Description copied from interface:
TimestampedValue
- Retrieves the time when this value was created.
- Specified by:
getCreateTime in interface TimestampedValue<V>- Specified by:
getCreateTime in class AbstractStatelessTimestampedValue<V>
- Returns:
- this value's creation time in seconds since epoch
Copyright © 2010 Terracotta, Inc.. All Rights Reserved.