public static class UniqueTracker.Token
extends java.lang.Object
UniqueIndex
objects locked and
updated by an operation on a particular UniqueTracker
instance. A token is created
by UniqueTracker.lockAndChange(BaseRecord, Context, String)
or UniqueTracker.lockAndDelete(BaseRecord, Context)
, and must subsequently be passed to
UniqueTracker.unlock(Token)
or UniqueTracker.rollbackChange(Token)
.
The latter method uses the token to roll back the changes made in an update or delete
operation. Both methods use the token to unlock any locked UniqueIndex
instances.Modifier and Type | Field and Description |
---|---|
private java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,UniqueTracker.UniqueIndex.Key>> |
affected
Pairs of
UniqueIndex offsets and old Key values |
private java.lang.Long |
id
Primary key of record indexed by a unit of work
|
Modifier | Constructor and Description |
---|---|
private |
Token(long id,
java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,UniqueTracker.UniqueIndex.Key>> affected)
Constructor.
|
private final java.lang.Long id
private final java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,UniqueTracker.UniqueIndex.Key>> affected
UniqueIndex
offsets and old Key
valuesprivate Token(long id, java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,UniqueTracker.UniqueIndex.Key>> affected)
id
- Primary key of the record involved in the operation described by this token.affected
- Pairs of UniqueIndex
offsets in their array within the tracker, and
Key
instances which were affected by the operation.