public final class SoftLockID
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
key |
private Element |
newElement |
private Element |
oldElement |
private static int |
PRIME |
private TransactionID |
transactionID |
private boolean |
wasPinned |
Constructor and Description |
---|
SoftLockID(TransactionID transactionID,
java.lang.Object key,
Element newElement,
Element oldElement,
boolean wasPinned)
Create a new SoftLockID instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
java.lang.Object |
getKey()
Get the key of the element this soft lock is guarding
|
Element |
getNewElement()
Get the Element with which this soft lock should be replaced by on commit.
|
Element |
getOldElement()
Get the Element with which this soft lock should be replaced by on rollback.
|
TransactionID |
getTransactionID()
Get the ID of the transaction under which this soft lock is operating
|
int |
hashCode() |
java.lang.String |
toString() |
boolean |
wasPinned()
Check if the key was pinned in the underlying store before its element was replaced by this soft lock
|
private static final int PRIME
private final TransactionID transactionID
private final java.lang.Object key
private final Element newElement
private final Element oldElement
private final boolean wasPinned
public SoftLockID(TransactionID transactionID, java.lang.Object key, Element newElement, Element oldElement, boolean wasPinned)
transactionID
- the transaction IDkey
- the element's key this soft lock is going to protectnewElement
- the new element, can be nulloldElement
- the old element, can be nullwasPinned
- true if the key whose element is about to be replaced by this soft lock was pinned in the underlying storepublic boolean wasPinned()
public TransactionID getTransactionID()
public java.lang.Object getKey()
public Element getNewElement()
public Element getOldElement()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object