com.atlassian.confluence.cache.tangosol.hibernate
Class CoherenceCacheStrategy.Item

java.lang.Object
  extended by com.atlassian.confluence.cache.tangosol.hibernate.CoherenceCacheStrategy.Item
All Implemented Interfaces:
CoherenceCacheStrategy.Lockable, Serializable
Enclosing class:
CoherenceCacheStrategy

public static final class CoherenceCacheStrategy.Item
extends Object
implements Serializable, CoherenceCacheStrategy.Lockable

An item of cached data, timestamped with the time it was cached,.

See Also:
CoherenceCacheStrategy, Serialized Form

Constructor Summary
CoherenceCacheStrategy.Item(Object value, long currentTimestamp, Object version)
           
 
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
 CoherenceCacheStrategy.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

CoherenceCacheStrategy.Item

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

getFreshTimestamp

public long getFreshTimestamp()
The timestamp on the cached data


getValue

public Object getValue()
The actual cached data


lock

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

Specified by:
lock in interface CoherenceCacheStrategy.Lockable

isLock

public boolean isLock()
Not a lock!

Specified by:
isLock in interface CoherenceCacheStrategy.Lockable

isGettable

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

Specified by:
isGettable in interface CoherenceCacheStrategy.Lockable

isPuttable

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

Specified by:
isPuttable in interface CoherenceCacheStrategy.Lockable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2011 Atlassian. All Rights Reserved.