public class CacheableTimestamp<K extends Serializable> extends Object implements Identifiable<K>, Comparable<CacheableTimestamp<K>>
id and last used timestamp of a
cached BackingCacheEntry.
Implements Comparable to make it easy to sort for LRU comparisons.
AbstractBackingCacheEntryStore#getInMemoryEntries(),
AbstractBackingCacheEntryStore#getAllEntries()| Constructor and Description |
|---|
CacheableTimestamp(BackingCacheEntry<K,?> entry) |
CacheableTimestamp(K id,
long lastUsed) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CacheableTimestamp<K> o)
Compares based on
last used, returning -1 for earlier timestamps. |
boolean |
equals(Object obj) |
K |
getId()
The object identifier.
|
long |
getLastUsed() |
int |
hashCode() |
public CacheableTimestamp(BackingCacheEntry<K,?> entry)
public CacheableTimestamp(K id, long lastUsed)
public K getId()
IdentifiablegetId in interface Identifiable<K extends Serializable>public long getLastUsed()
public int compareTo(CacheableTimestamp<K> o)
last used, returning -1 for earlier timestamps.compareTo in interface Comparable<CacheableTimestamp<K extends Serializable>>Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.