| java.util.Hashtable org.apache.derby.impl.services.locks.LockSet
LockSet | final public class LockSet extends Hashtable (Code) | | A LockSet is a complete lock table. A lock table is a hash table
keyed by a Lockable and with a LockControl as the data element.
A LockControl contains information about the locks held on a Lockable.
MT - Mutable - Container Object : Thread Safe
The Hashtable we extend is synchronized on this, all addition, searching of
the hashtable is performed using java synchroization(this).
The class creates ActiveLock and LockControl objects.
LockControl objects are never passed out of this class, All the methods of
LockControl are called while being synchronized on this, thus providing the
single threading that LockControl required.
Methods of Lockables are only called by this class or LockControl, and
always while being synchronized on this, thus providing the single
threading that Lockable requires.
See Also: LockControl |
blockCount | protected int blockCount(Code) | | |
deadlockTimeout | protected int deadlockTimeout(Code) | | Timeout for deadlocks, in ms.
MT - immutable
|
waitTimeout | protected int waitTimeout(Code) | | |
anyoneBlocked | boolean anyoneBlocked()(Code) | | |
lockObject | public Lock lockObject(Object compatabilitySpace, Lockable ref, Object qualifier, int timeout, Latch latch) throws StandardException(Code) | | Lock an object within a specific compatibility space.
Parameters: compatabilitySpace - Compatibility space. Parameters: ref - Lockable reference. Parameters: qualifier - Qualifier. Parameters: timeout - Timeout in milli-seconds Object that represents the lock. exception: StandardException - Standard Cloudscape policy. |
oneLessWaiter | void oneLessWaiter()(Code) | | |
oneMoreWaiter | void oneMoreWaiter()(Code) | | |
setDeadlockTrace | void setDeadlockTrace(boolean val)(Code) | | |
unlock | void unlock(Latch item, int unlockCount)(Code) | | Unlock an object, previously locked by lockObject().
If unlockCOunt is not zero then the lock will be unlocked
that many times, otherwise the unlock count is taken from
item.
|
|
|