org.terracotta.cache.serialization
Class CustomLifespanSerializedEntry<T>
java.lang.Object
org.terracotta.cache.value.AbstractStatelessTimestampedValue<V>
org.terracotta.cache.value.AbstractTimestampedValue<byte[]>
org.terracotta.cache.serialization.SerializedEntry<T>
org.terracotta.cache.serialization.CustomLifespanSerializedEntry<T>
- All Implemented Interfaces:
- TimestampedValue<byte[]>
public class CustomLifespanSerializedEntry<T>
- extends SerializedEntry<T>
A SerializedEntry subclass that supports cache entries with custom TTI/TTL values.
- Author:
- Chris Dennis
|
Constructor Summary |
CustomLifespanSerializedEntry(T deserialized,
byte[] serialized,
int tti,
int ttl,
int createTime)
|
CustomLifespanSerializedEntry(T deserialized,
byte[] serialized,
int tti,
int ttl,
int createTime,
int lastAccessedTime)
|
CustomLifespanSerializedEntry(T deserialized,
byte[] serialized,
int tti,
int ttl,
TimeSource timeSource)
|
|
Method Summary |
int |
expiresAt(CacheConfig config)
Get the time at which this timestamp will become invalid. |
CustomLifespanSerializedEntry
public CustomLifespanSerializedEntry(T deserialized,
byte[] serialized,
int tti,
int ttl,
TimeSource timeSource)
CustomLifespanSerializedEntry
public CustomLifespanSerializedEntry(T deserialized,
byte[] serialized,
int tti,
int ttl,
int createTime)
CustomLifespanSerializedEntry
public CustomLifespanSerializedEntry(T deserialized,
byte[] serialized,
int tti,
int ttl,
int createTime,
int lastAccessedTime)
expiresAt
public int expiresAt(CacheConfig config)
- Description copied from class:
AbstractStatelessTimestampedValue
- Get the time at which this timestamp will become invalid. If the config specified ttl == tti == 0, making items
eternal, then this method returns
TimestampedValue.NEVER_EXPIRE.
- Specified by:
expiresAt in interface TimestampedValue<byte[]>- Overrides:
expiresAt in class AbstractStatelessTimestampedValue<byte[]>
- Parameters:
config - The configuration
- Returns:
- Timestamp of expiration, >0, may be NEVER_EXPIRE if eternal
Copyright © 2010 Terracotta, Inc.. All Rights Reserved.