public static final class ReadWriteCache.Lock extends Object implements Serializable, ReadWriteCache.Lockable, SoftLock
| Constructor and Description |
|---|
Lock(long timeout,
int id,
Object version) |
| Modifier and Type | Method and Description |
|---|---|
int |
getId() |
long |
getUnlockTimestamp() |
boolean |
isGettable(long txTimestamp)
locks are not returned to the client!
|
boolean |
isLock()
Yes, this is a lock
|
boolean |
isPuttable(long txTimestamp,
Object newVersion,
Comparator comparator)
Can the timestamped transaction re-cache this
locked item now?
|
ReadWriteCache.Lock |
lock(long timeout,
int id)
Increment the lock, setting the
new lock timeout
|
String |
toString() |
void |
unlock(long currentTimestamp)
Decrement the lock, setting the unlock
timestamp if now unlocked
|
boolean |
wasLockedConcurrently()
Was this lock held concurrently by multiple
transactions?
|
public Lock(long timeout,
int id,
Object version)
public long getUnlockTimestamp()
public ReadWriteCache.Lock lock(long timeout, int id)
lock in interface ReadWriteCache.Lockablepublic void unlock(long currentTimestamp)
currentTimestamp - public boolean isPuttable(long txTimestamp,
Object newVersion,
Comparator comparator)
isPuttable in interface ReadWriteCache.Lockablepublic boolean wasLockedConcurrently()
public boolean isLock()
isLock in interface ReadWriteCache.Lockablepublic boolean isGettable(long txTimestamp)
isGettable in interface ReadWriteCache.Lockablepublic int getId()
Copyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved