org.ehcache.transactions.xa
Class SoftLock<V>
java.lang.Object
org.ehcache.transactions.xa.SoftLock<V>
- All Implemented Interfaces:
- java.io.Serializable
public class SoftLock<V>
- extends java.lang.Object
- implements java.io.Serializable
SoftLock
s are the value containers stored in the underlying store by the XAStore
.
A SoftLock
contains three essential things:
- The transaction ID responsible for inserting the
SoftLock
, or null if the transaction is terminated.
- The old value, i.e.: the value that is going to be stored upon transaction rollback, or null if there was no value.
- The new value holder, i.e.: the value holder that is going to be stored upon transaction commit, or null if the mapping is to be removed.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SoftLock
public SoftLock(TransactionId transactionId,
V oldValue,
XAValueHolder<V> newValueHolder)
copyForSerialization
protected SoftLock<V> copyForSerialization(Serializer<V> valueSerializer)
copyAfterDeserialization
protected SoftLock<V> copyAfterDeserialization(Serializer<V> valueSerializer,
SoftLock<V> serializedSoftLock)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
getOldValue
public V getOldValue()
getNewValueHolder
public XAValueHolder<V> getNewValueHolder()
getTransactionId
public TransactionId getTransactionId()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object