| java.util.Hashtable org.apache.derby.impl.services.locks.SinglePool
SinglePool | public class SinglePool extends Hashtable implements LockFactory(Code) | | An implementation of LockFactory that uses a single pool
for the locks, i.e. all lock requests go through a single
point of synchronisation.
The default concrete class "SinglePool.java", prints nothing and thus
incurs no overhead associated with the code to dump lock information. An
alternate concrete class "LockDebug/TracingSinglePool.java", attempts to
output only lock information that "makes sense" to a user - for instance it
doesn't print latch locks.
MT - Mutable - Container Object : Thread Aware
|
Method Summary | |
public boolean | anyoneBlocked() | public Serviceable | apply(String key, Serializable value, Dictionary p) | public boolean | areLocksHeld(Object compatabilitySpace, Object group) Return true if locks are held in this group and this space. | public boolean | areLocksHeld(Object compatabilitySpace) | public void | clearLimit(Object compatabilitySpace, Object group) Clear a limit set by setLimit. | public void | init(boolean dbOnly, Dictionary p) | public boolean | isLockHeld(Object compatabilitySpace, Object group, Lockable ref, Object qualifier) | public boolean | latchObject(Object compatabilitySpace, Lockable ref, Object qualifier, int timeout) Latch a specific object with a timeout. | protected Lock | lockAnObject(Object compatabilitySpace, Object group, Lockable ref, Object qualifier, int timeout, Latch heldLatch) Lock a specific object with a timeout. | public boolean | lockObject(Object compatabilitySpace, Object group, Lockable ref, Object qualifier, int timeout) | public boolean | lockObject(Object group, Lockable ref, Object qualifier, int timeout, Latch latch) | public Enumeration | makeVirtualLockTable() | public Serializable | map(String key, Serializable value, Dictionary p) | public synchronized void | setLimit(Object compatabilitySpace, Object group, int limit, Limit callback) | public String | toDebugString() | public void | transfer(Object compatabilitySpace, Object oldGroup, Object newGroup) Transfer a set of locks from one group to another. | public void | unlatch(Latch heldLatch) Unlatch an object. | public int | unlock(Object compatabilitySpace, Object group, Lockable ref, Object qualifier) | public void | unlockGroup(Object compatabilitySpace, Object group) Unlock a group of objects. | public void | unlockGroup(Object compatabilitySpace, Object group, Matchable key) | public boolean | validate(String key, Serializable value, Dictionary p) | public boolean | zeroDurationlockObject(Object compatabilitySpace, Lockable ref, Object qualifier, int timeout) |
deadlockMonitor | int deadlockMonitor(Code) | | True if all deadlocks errors should be logged.
|
lockTable | final protected LockSet lockTable(Code) | | The complete set of locks in the system
MT - immutable - content dynamic : LockSet is ThreadSafe
|
SinglePool | public SinglePool()(Code) | | |
anyoneBlocked | public boolean anyoneBlocked()(Code) | | Returns true if locks by anyone are blocking anyone else
|
areLocksHeld | public boolean areLocksHeld(Object compatabilitySpace, Object group)(Code) | | Return true if locks are held in this group and this space.
MT - thread safe
Parameters: group - handle of group that objects were locked with. See Also: LockFactory.areLocksHeld |
clearLimit | public void clearLimit(Object compatabilitySpace, Object group)(Code) | | Clear a limit set by setLimit.
|
makeVirtualLockTable | public Enumeration makeVirtualLockTable()(Code) | | Routines to support lock diagnostics VTIs for the benefit of VirtualLockTable
|
setLimit | public synchronized void setLimit(Object compatabilitySpace, Object group, int limit, Limit callback)(Code) | | |
unlockGroup | public void unlockGroup(Object compatabilitySpace, Object group)(Code) | | Unlock a group of objects.
MT - thread safe
Parameters: group - handle of group that objects were locked with.If group is null then this call is equivilent to unlockAll(). See Also: LockFactory.unlockGroup |
|
|