Package org.hibernate.cache
Class ReadWriteCache.Item
java.lang.Object
org.hibernate.cache.ReadWriteCache.Item
- All Implemented Interfaces:
Serializable,ReadWriteCache.Lockable
- Enclosing class:
ReadWriteCache
public static final class ReadWriteCache.Item
extends Object
implements Serializable, ReadWriteCache.Lockable
An item of cached data, timestamped with the time it was cached,.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongThe timestamp on the cached datagetValue()The actual cached databooleanisGettable(long txTimestamp) Is this item visible to the timestamped transaction?booleanisLock()Not a lock!booleanisPuttable(long txTimestamp, Object newVersion, Comparator comparator) Don't overwite already cached itemslock(long timeout, int id) Lock the itemtoString()
-
Constructor Details
-
Item
-
-
Method Details
-
getFreshTimestamp
public long getFreshTimestamp()The timestamp on the cached data -
getValue
The actual cached data -
lock
Lock the item- Specified by:
lockin interfaceReadWriteCache.Lockable
-
isLock
public boolean isLock()Not a lock!- Specified by:
isLockin interfaceReadWriteCache.Lockable
-
isGettable
public boolean isGettable(long txTimestamp) Is this item visible to the timestamped transaction?- Specified by:
isGettablein interfaceReadWriteCache.Lockable
-
isPuttable
Don't overwite already cached items- Specified by:
isPuttablein interfaceReadWriteCache.Lockable
-
toString
-