public static final class ReadWriteCache.Item extends java.lang.Object implements java.io.Serializable, ReadWriteCache.Lockable
ReadWriteCache,
Serialized Form| Constructor and Description |
|---|
ReadWriteCache.Item(java.lang.Object value,
java.lang.Object version,
long currentTimestamp) |
| Modifier and Type | Method and Description |
|---|---|
long |
getFreshTimestamp()
The timestamp on the cached data
|
java.lang.Object |
getValue()
The actual cached data
|
boolean |
isGettable(long txTimestamp)
Is this item visible to the timestamped
transaction?
|
boolean |
isLock()
Not a lock!
|
boolean |
isPuttable(long txTimestamp,
java.lang.Object newVersion,
java.util.Comparator comparator)
Don't overwite already cached items
|
ReadWriteCache.Lock |
lock(long timeout,
int id)
Lock the item
|
java.lang.String |
toString() |
public ReadWriteCache.Item(java.lang.Object value,
java.lang.Object version,
long currentTimestamp)
public long getFreshTimestamp()
public java.lang.Object getValue()
public ReadWriteCache.Lock lock(long timeout, int id)
lock in interface ReadWriteCache.Lockablepublic boolean isLock()
isLock in interface ReadWriteCache.Lockablepublic boolean isGettable(long txTimestamp)
isGettable in interface ReadWriteCache.Lockablepublic boolean isPuttable(long txTimestamp,
java.lang.Object newVersion,
java.util.Comparator comparator)
isPuttable in interface ReadWriteCache.Lockablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013. All Rights Reserved.