|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.impl.services.locks.Lock
A Lock represents a granted or waiting lock request.
MT - Mutable - Immutable identity : Thread Aware
| Field Summary | |
(package private) int |
count
|
private java.lang.Object |
qualifier
Qualifier used in the lock request.. |
private Lockable |
ref
Object being locked. |
private java.lang.Object |
space
Compatibility space the object is locked in. |
| Constructor Summary | |
protected |
Lock(java.lang.Object space,
Lockable ref,
java.lang.Object qualifier)
|
| Method Summary | |
void |
addWaiters(java.util.Dictionary waiters)
|
(package private) Lock |
copy()
|
boolean |
equals(java.lang.Object other)
|
ActiveLock |
firstWaiter()
|
java.lang.Object |
getCompatabilitySpace()
Return the compatability space this lock is held in MT - Thread safe |
int |
getCount()
Return the count of locks. |
Lock |
getFirstGrant()
|
java.util.List |
getGranted()
|
Lock |
getLock(java.lang.Object compatabilitySpace,
java.lang.Object qualifier)
|
Lockable |
getLockable()
Return the object this lock is held on MT - Thread safe |
LockControl |
getLockControl()
|
java.lang.Object |
getQualifier()
Return the qualifier lock was obtained with. |
java.util.List |
getWaiting()
|
(package private) void |
grant()
|
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
isGrantable(boolean noWaitersBeforeMe,
java.lang.Object compatabilitySpace,
java.lang.Object requestQualifier)
|
Control |
shallowClone()
We can return ourselves here because our identity is immutable and what we returned will not be accessed as a Lock, so the count cannot be changed. |
(package private) int |
unlock(int unlockCount)
|
boolean |
unlock(Latch lockInGroup,
int unlockCount)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private final java.lang.Object space
private final Lockable ref
private final java.lang.Object qualifier
int count
| Constructor Detail |
protected Lock(java.lang.Object space,
Lockable ref,
java.lang.Object qualifier)
| Method Detail |
public final Lockable getLockable()
getLockable in interface Latchpublic final java.lang.Object getCompatabilitySpace()
getCompatabilitySpace in interface Latchpublic final java.lang.Object getQualifier()
getQualifier in interface Latchpublic final int getCount()
getCount in interface Latchfinal Lock copy()
void grant()
int unlock(int unlockCount)
public final int hashCode()
public final boolean equals(java.lang.Object other)
public LockControl getLockControl()
getLockControl in interface Control
public Lock getLock(java.lang.Object compatabilitySpace,
java.lang.Object qualifier)
getLock in interface Controlpublic Control shallowClone()
shallowClone in interface Controlpublic ActiveLock firstWaiter()
firstWaiter in interface Controlpublic boolean isEmpty()
isEmpty in interface Control
public boolean unlock(Latch lockInGroup,
int unlockCount)
unlock in interface Controlpublic void addWaiters(java.util.Dictionary waiters)
addWaiters in interface Controlpublic Lock getFirstGrant()
getFirstGrant in interface Controlpublic java.util.List getGranted()
getGranted in interface Controlpublic java.util.List getWaiting()
getWaiting in interface Control
public boolean isGrantable(boolean noWaitersBeforeMe,
java.lang.Object compatabilitySpace,
java.lang.Object requestQualifier)
isGrantable in interface Control
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||