|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.utils.locking.RwLockHolder
Used to keep track of the total number of outstanding locks placed but not yet released for a given resource.
Field Summary | |
(package private) long |
lastInactiveTime
Last timestamp when the lcount was zero. |
(package private) int |
lcount
Number of locks that have been placed on the rwlock and not yet released. |
private ReadWriteLock |
rwlock
Contained ReadWriteLock |
private static long |
UNUSED_TIME
|
Constructor Summary | |
(package private) |
RwLockHolder(ReadWriteLock rwlock)
Constructs with a Read/Write lock for a specific resource. |
Method Summary | |
void |
done()
|
void |
readLock()
|
(package private) boolean |
removable(long now)
Returns true iff this object satisfies the condition of removing RwLockHolder from the managing ReadWriteLockManager. |
void |
writeLock()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long UNUSED_TIME
private final ReadWriteLock rwlock
int lcount
long lastInactiveTime
Constructor Detail |
RwLockHolder(ReadWriteLock rwlock)
rwlock
- Method Detail |
boolean removable(long now)
public void readLock() throws java.lang.InterruptedException
java.lang.InterruptedException
ReadWriteLock.readLock()
public void writeLock() throws java.lang.InterruptedException
java.lang.InterruptedException
ReadWriteLock.writeLock()
public void done()
ReadWriteLock.done()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |