站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

ReadWriteCache.Item (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.cache
Class ReadWriteCache.Item

java.lang.Object
  extended byorg.hibernate.cache.ReadWriteCache.Item
All Implemented Interfaces:
ReadWriteCache.Lockable, Serializable
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:
ReadWriteCache, Serialized Form

Constructor Summary
ReadWriteCache.Item(Object value, Object version, long currentTimestamp)
           
 
Method Summary
 long getFreshTimestamp()
          The timestamp on the cached data
 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, Object newVersion, Comparator comparator)
          Don't overwite already cached items
 ReadWriteCache.Lock lock(long timeout, int id)
          Lock the item
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadWriteCache.Item

public ReadWriteCache.Item(Object value,
                           Object version,
                           long currentTimestamp)
Method Detail

getFreshTimestamp

public long getFreshTimestamp()
The timestamp on the cached data


getValue

public Object getValue()
The actual cached data


lock

public ReadWriteCache.Lock lock(long timeout,
                                int id)
Lock the item

Specified by:
lock in interface ReadWriteCache.Lockable

isLock

public boolean isLock()
Not a lock!

Specified by:
isLock in interface ReadWriteCache.Lockable

isGettable

public boolean isGettable(long txTimestamp)
Is this item visible to the timestamped transaction?

Specified by:
isGettable in interface ReadWriteCache.Lockable

isPuttable

public boolean isPuttable(long txTimestamp,
                          Object newVersion,
                          Comparator comparator)
Don't overwite already cached items

Specified by:
isPuttable in interface ReadWriteCache.Lockable

toString

public String toString()