ehcache

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

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

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

Represents an Element's version for a Store


Constructor Summary
EhcacheXAStoreImpl.Version()
           
 
Method Summary
 boolean checkinRead(javax.transaction.xa.Xid xid)
          Read check in: the transaction is done with the element, but did not mutate it
 boolean checkinWrite(javax.transaction.xa.Xid xid)
          Write check in: the transaction is done with the element and did mutate it
 long checkout(javax.transaction.xa.Xid xid)
          Checks out a version for a Transaction
 long getVersion()
          For testing, get current version
 long getVersion(javax.transaction.xa.Xid xid)
          Gets the version known to a Transaction
 boolean hasTransaction(javax.transaction.xa.Xid xid)
          Checks whether a Transaction already accessed the key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhcacheXAStoreImpl.Version

public EhcacheXAStoreImpl.Version()
Method Detail

getVersion

public long getVersion()
For testing, get current version

Returns:
the version

hasTransaction

public boolean hasTransaction(javax.transaction.xa.Xid xid)
Checks whether a Transaction already accessed the key

Parameters:
xid - the Xid for the Transaction
Returns:
true, if known

getVersion

public long getVersion(javax.transaction.xa.Xid xid)
Gets the version known to a Transaction

Parameters:
xid - the Xis for the Transaction
Returns:
the versionNumber

checkout

public long checkout(javax.transaction.xa.Xid xid)
Checks out a version for a Transaction

Parameters:
xid - the Xid for the Transaction
Returns:
the version number

checkinRead

public boolean checkinRead(javax.transaction.xa.Xid xid)
Read check in: the transaction is done with the element, but did not mutate it

Parameters:
xid - the Xid for the Transaction
Returns:
false if the Element is still known to other Transaction, otherwise true

checkinWrite

public boolean checkinWrite(javax.transaction.xa.Xid xid)
Write check in: the transaction is done with the element and did mutate it

Parameters:
xid - the Xid for the Transaction
Returns:
false if the Element is still known to other Transaction, otherwise true

ehcache

true