LockFactory are implemented. Subclasses must implement the
createLockTable() method and make it return the desired
LockTable object.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | deadlockMonitor
True if all deadlocks errors should be logged. |
| protected final LockTable | lockTable
The complete set of locks in the system MT - immutable - content dynamic : LockSet is ThreadSafe |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | anyoneBlocked()
Implements org. Returns true if locks by anyone are blocking anyone else |
| public Serviceable | apply(String
Property key for the property being set key, Serializable proposed new value for the property being set or null if
the property is being dropped. value, Dictionary<K, V> Property set before the change. SettingProperty may read but
must never change p. p)Implements org. Apply a property change. |
| public boolean | areLocksHeld(CompatibilitySpace
A lock space compatibilitySpace, Object handle of group that objects were locked with. group)Implements org. Return true if locks are held in this group and this space. |
| public boolean | areLocksHeld(CompatibilitySpace
A lock space compatibilitySpace)Implements org. Return true if locks are held in this space MT - thread safe |
| public void | clearLimit(CompatibilitySpace
A lock space compatibilitySpace, Object A group group)Implements org. Clear a limit set by setLimit. |
| public CompatibilitySpace | Returns: an object which represents a compatibility spacethe owner of the compatibility space owner)Implements org. Create an object which can be used as a compatibility space within this lock manager. |
| protected abstract LockTable | Returns: an object implementing theLockTable interfaceCreate the lock table that contains the mapping from
|
| private void | |
| public int | getWaitTimeout()
Implements org. Get the lock timeout in milliseconds. |
| private static int | |
| public void | init(boolean
true if only per-database properties are to be looked at dbOnly, Dictionary<K, V> the complete set of per-database properties. p)Implements org. Initialize the properties for this callback. |
| public boolean | isLockHeld(CompatibilitySpace
A lock space compatibilitySpace, Object A group group, Lockable Something which can be locked ref, Object The kind of lock qualifier)Implements org. Check to see if a specific lock is held. |
| public boolean | lockObject(CompatibilitySpace
object defining compatibility space compatibilitySpace, Object handle of group, must be private to a thread. group, Lockable reference to object to be locked ref, Object A qualification of the request. qualifier, int the maximum time to wait in milliseconds, LockFactory.NO_WAIT means don't wait. timeout)Implements org. Lock a specific object with a timeout. |
| public Enumeration | makeVirtualLockTable()
Implements org. Routines to support lock diagnostics VTIs for the benefit of VirtualLockTable |
| public Serializable | map(String
Property key for the property being set key, Serializable proposed new value for the property being set or null if
the property is being dropped. value, Dictionary<K, V> Property set before the change. SettingProperty may read but
must never change p. p)Implements org. Map a proposed new value for a property to an official value. |
| pack-priv static boolean | Returns: true if we shouldn't wait for locks, false
otherwisethe specified timeout timeout, CompatibilitySpace the compatibility space compat)Check if we should not wait for locks, given the specified timeout and compatibility space. |
| public void | setLimit(CompatibilitySpace
A lock space compatibilitySpace, Object A group group, int A limit for the group limit, Limit Code to call when the limit is reached callback)Implements org. Install a limit that is called when the size of the group exceeds the required limit. |
| public void | transfer(CompatibilitySpace
A lock space compatibilitySpace, Object The source group oldGroup, Object The target group newGroup)Implements org. Transfer a set of locks from one group to another. |
| public int | unlock(CompatibilitySpace
object defining compatibility space compatibilitySpace, Object handle of group. group, Lockable Reference to object to be unlocked. ref, Object qualifier of lock to be unlocked qualifier)Implements org. Unlock a specific object MT - thread safe |
| public void | unlockGroup(CompatibilitySpace
object defining compatibility space compatibilitySpace, Object handle of group that objects were locked with.
If group is null then this call is equivilent to unlockAll(). group)Implements org. Unlock a group of objects. |
| public void | unlockGroup(CompatibilitySpace
A lock space compatibilitySpace, Object A group group, Matchable The key key)Implements org. Unlock all locks on a group that match the passed in value. |
| public boolean | validate(String
Property key for the property being set key, Serializable proposed new value for the property being set or null if
the property is being dropped. value, Dictionary<K, V> Property set before the change. SettingProperty may read but
must never change p. p)Implements org. Validate a property change. |
| public boolean | zeroDurationlockObject(CompatibilitySpace
object defining compatibility space compatibilitySpace, Lockable reference to object to be locked ref, Object A qualification of the request. qualifier, int the maximum time to wait in milliseconds, LockFactory.NO_WAIT means don't wait. timeout)Implements org. Lock an object with zero duration within a compatibility space, waits up to timeout milli-seconds for the object to become unlocked. |
| deadlockMonitor | back to summary |
|---|---|
| pack-priv int deadlockMonitor True if all deadlocks errors should be logged. | |
| lockTable | back to summary |
|---|---|
| protected final LockTable lockTable The complete set of locks in the system
| |
| AbstractPool | back to summary |
|---|---|
| protected AbstractPool() | |
| anyoneBlocked | back to summary |
|---|---|
| public boolean anyoneBlocked() Implements org. Returns true if locks by anyone are blocking anyone else
| |
| apply | back to summary |
|---|---|
| public Serviceable apply(String key, Serializable value, Dictionary<K, V> p) throws StandardException Implements org. Doc from org. Apply a property change. Will only be called after validate has been called and only if validate returned true. If this method is called then the new value is the value to be used, ie. the property is not set in the overriding JVM system set.
| |
| areLocksHeld | back to summary |
|---|---|
| public boolean areLocksHeld(CompatibilitySpace compatibilitySpace, Object group) Implements org. Return true if locks are held in this group and this space.
| |
| areLocksHeld | back to summary |
|---|---|
| public boolean areLocksHeld(CompatibilitySpace compatibilitySpace) Implements org. Return true if locks are held in this space
| |
| clearLimit | back to summary |
|---|---|
| public void clearLimit(CompatibilitySpace compatibilitySpace, Object group) Implements org. Clear a limit set by setLimit.
| |
| createCompatibilitySpace | back to summary |
|---|---|
| public CompatibilitySpace createCompatibilitySpace(LockOwner owner) Implements org. Create an object which can be used as a compatibility space within this lock manager.
| |
| createLockTable | back to summary |
|---|---|
| protected abstract LockTable createLockTable() Create the lock table that contains the mapping from
| |
| getAndApply | back to summary |
|---|---|
| private void getAndApply(boolean dbOnly, Dictionary<K, V> p, String key) | |
| getWaitTimeout | back to summary |
|---|---|
| public int getWaitTimeout() Implements org. Get the lock timeout in milliseconds. A negative number means that there is no timeout.
| |
| getWaitValue | back to summary |
|---|---|
| private static int getWaitValue(String value, int defaultValue) | |
| init | back to summary |
|---|---|
| public void init(boolean dbOnly, Dictionary<K, V> p) Implements org. Doc from org. Initialize the properties for this callback. Called when addPropertySetNotification() is called with a non-null transaction controller. This allows code to set read its initial property values at boot time. Code within an init() method should use the 3 argument PropertyUtil method getPropertyFromSet() to obtain a property's value.
| |
| isLockHeld | back to summary |
|---|---|
| public boolean isLockHeld(CompatibilitySpace compatibilitySpace, Object group, Lockable ref, Object qualifier) Implements org. Doc from org. Check to see if a specific lock is held.
| |
| lockObject | back to summary |
|---|---|
| public boolean lockObject(CompatibilitySpace compatibilitySpace, Object group, Lockable ref, Object qualifier, int timeout) throws StandardException Implements org. Lock a specific object with a timeout.
| |
| makeVirtualLockTable | back to summary |
|---|---|
| public Enumeration Implements org. Routines to support lock diagnostics VTIs for the benefit of VirtualLockTable
| |
| map | back to summary |
|---|---|
| public Serializable map(String key, Serializable value, Dictionary<K, V> p) Implements org. Doc from org. Map a proposed new value for a property to an official value. Will only be called after apply() has been called.
| |
| noLockWait | back to summary |
|---|---|
| pack-priv static boolean noLockWait(int timeout, CompatibilitySpace compat) Check if we should not wait for locks, given the specified timeout and
compatibility space. If the timeout is
| |
| setLimit | back to summary |
|---|---|
| public void setLimit(CompatibilitySpace compatibilitySpace, Object group, int limit, Limit callback) Implements org. Doc from org. Install a limit that is called when the size of the group exceeds
the required limit.
| |
| transfer | back to summary |
|---|---|
| public void transfer(CompatibilitySpace compatibilitySpace, Object oldGroup, Object newGroup) Implements org. Transfer a set of locks from one group to another.
| |
| unlock | back to summary |
|---|---|
| public int unlock(CompatibilitySpace compatibilitySpace, Object group, Lockable ref, Object qualifier) Implements org. Unlock a specific object
| |
| unlockGroup | back to summary |
|---|---|
| public void unlockGroup(CompatibilitySpace compatibilitySpace, Object group) Implements org. Unlock a group of objects.
| |
| unlockGroup | back to summary |
|---|---|
| public void unlockGroup(CompatibilitySpace compatibilitySpace, Object group, Matchable key) Implements org. Doc from org. Unlock all locks on a group that match the passed in value.
| |
| validate | back to summary |
|---|---|
| public boolean validate(String key, Serializable value, Dictionary<K, V> p) throws StandardException Implements org. Doc from org. Validate a property change.
| |
| zeroDurationlockObject | back to summary |
|---|---|
| public boolean zeroDurationlockObject(CompatibilitySpace compatibilitySpace, Lockable ref, Object qualifier, int timeout) throws StandardException Implements org. Doc from org. Lock an object with zero duration within a compatibility space, waits up to timeout milli-seconds for the object to become unlocked. A timeout of 0 means do not wait for the lock to be unlocked. Note the actual time waited is approximate. Zero duration means the lock is released as soon as it is obtained.
A compatibility space in an space where lock requests are assumed to be
compatible and granted by the lock manager if the trio
{compatibilitySpace, ref, qualifier} are equal (i.e. reference equality
for qualifier and compatibilitySpace, equals() method for ref).
Granted by the lock manager means that the Lockable object may or may
not be queried to see if the request is compatible.
| |