ehcache

net.sf.ehcache.transaction.xa
Class EhcacheXAStoreImpl.VersionTable

java.lang.Object
  extended by net.sf.ehcache.transaction.xa.EhcacheXAStoreImpl.VersionTable
Enclosing class:
EhcacheXAStoreImpl

public static class EhcacheXAStoreImpl.VersionTable
extends java.lang.Object

A table containing element version information


Field Summary
protected  java.util.concurrent.ConcurrentMap<java.lang.Object,EhcacheXAStoreImpl.Version> versionStore
          The data underlying structure for the version info for Key (where the version is the Long)
 
Constructor Summary
EhcacheXAStoreImpl.VersionTable()
           
 
Method Summary
 void checkin(java.lang.Object key, javax.transaction.xa.Xid xid, boolean readOnly)
          Increment versioning information of a mutated and stored information to the store
 long checkout(java.lang.Object key, javax.transaction.xa.Xid xid)
          Track a version for an element, potentially adding it to the store
 boolean valid(java.lang.Object key, long currentVersionNumber, javax.transaction.xa.Xid xid)
          Checks whether a version is still up to date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionStore

protected final java.util.concurrent.ConcurrentMap<java.lang.Object,EhcacheXAStoreImpl.Version> versionStore
The data underlying structure for the version info for Key (where the version is the Long)

Constructor Detail

EhcacheXAStoreImpl.VersionTable

public EhcacheXAStoreImpl.VersionTable()
Method Detail

valid

public boolean valid(java.lang.Object key,
                     long currentVersionNumber,
                     javax.transaction.xa.Xid xid)
Checks whether a version is still up to date

Parameters:
key - the key to check for
currentVersionNumber - the version checked out
Returns:
true if the version is still up to date

checkout

public long checkout(java.lang.Object key,
                     javax.transaction.xa.Xid xid)
Track a version for an element, potentially adding it to the store

Parameters:
key - the key matching the element in the store
xid - the Xid of the Transaction
Returns:
the version

checkin

public void checkin(java.lang.Object key,
                    javax.transaction.xa.Xid xid,
                    boolean readOnly)
Increment versioning information of a mutated and stored information to the store

Parameters:
key - the key matching the element in the store
xid - the Xid of the Transaction
readOnly - whether the element was mutated in the Store

ehcache

true