public class BasicTSEntry extends com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>
| Modifier and Type | Field and Description |
|---|---|
long |
creationTime
Timestamp of actual creation of entry; used for TTL calculations.
|
BasicTSKey |
key
Key used to refer to this entry
|
com.fasterxml.clustermate.service.LastAccessUpdateMethod |
lastAccessUpdateMethod |
int |
maxTTLSecs
Maximum time-to-live, in seconds, since creation.
|
int |
minTTLSinceAccessSecs
Minimum time-to-live, in seconds, since the entry was last accessed.
|
com.fasterxml.storemate.store.Storable |
rawEntry
"Raw" serialized contents of the entry
|
| Modifier | Constructor and Description |
|---|---|
protected |
BasicTSEntry(BasicTSKey key,
com.fasterxml.storemate.store.Storable rawEntry,
long creationTime,
int minTTLSecs,
int maxTTLSecs,
com.fasterxml.clustermate.service.LastAccessUpdateMethod lastAccessUpdatedMethod)
Constructor used by unit tests, synchronization code
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
createdBefore(long timestamp) |
long |
getCreationTime() |
BasicTSKey |
getKey() |
com.fasterxml.clustermate.service.LastAccessUpdateMethod |
getLastAccessUpdateMethod() |
int |
getMaxTTLSecs() |
int |
getMinTTLSinceAccessSecs() |
com.fasterxml.storemate.store.Storable |
getRaw() |
boolean |
hasExceededLastAccessTTL(long currentTime,
long lastAccess) |
boolean |
hasExceededMaxTTL(long currentTime) |
boolean |
hasExceededMinTTL(long currentTime) |
boolean |
insertedBefore(long timestamp) |
int |
routingHashUsing(com.fasterxml.clustermate.api.EntryKeyConverter<BasicTSKey> hasher) |
String |
toString() |
boolean |
usesLastAccessTime() |
public final BasicTSKey key
public final com.fasterxml.storemate.store.Storable rawEntry
public final long creationTime
public final int maxTTLSecs
This value may be sent by client; if not, a default value will be used.
Note that this setting has higher precedence that minTTLSinceAccessSecs,
meaning that it will effectively limit maximum time an entry can live.
public final int minTTLSinceAccessSecs
This value may be sent by client; if not, a default value will be used.
Note that this value has lower precedence than maxTTLSecs,
meaning that even if entry is regularly accessed, it can not
"live forever".
public final com.fasterxml.clustermate.service.LastAccessUpdateMethod lastAccessUpdateMethod
protected BasicTSEntry(BasicTSKey key, com.fasterxml.storemate.store.Storable rawEntry, long creationTime, int minTTLSecs, int maxTTLSecs, com.fasterxml.clustermate.service.LastAccessUpdateMethod lastAccessUpdatedMethod)
public BasicTSKey getKey()
getKey in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public com.fasterxml.storemate.store.Storable getRaw()
getRaw in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public com.fasterxml.clustermate.service.LastAccessUpdateMethod getLastAccessUpdateMethod()
getLastAccessUpdateMethod in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public int getMinTTLSinceAccessSecs()
getMinTTLSinceAccessSecs in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public int getMaxTTLSecs()
getMaxTTLSecs in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public long getCreationTime()
getCreationTime in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public boolean hasExceededMaxTTL(long currentTime)
hasExceededMaxTTL in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public boolean hasExceededMinTTL(long currentTime)
hasExceededMinTTL in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public boolean usesLastAccessTime()
usesLastAccessTime in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public boolean hasExceededLastAccessTTL(long currentTime,
long lastAccess)
hasExceededLastAccessTTL in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public boolean insertedBefore(long timestamp)
insertedBefore in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public boolean createdBefore(long timestamp)
createdBefore in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>public int routingHashUsing(com.fasterxml.clustermate.api.EntryKeyConverter<BasicTSKey> hasher)
routingHashUsing in class com.fasterxml.clustermate.service.store.StoredEntry<BasicTSKey>Copyright © 2013 FasterXML. All Rights Reserved.