Top Constructors Methods
org.apache.derby.iapi.services.locks

public Class ShExLockable

extends Object
implements Lockable
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.locks.Lockable
Known Direct Subclasses
org.apache.derby.impl.store.access.CacheLock, org.apache.derby.impl.services.reflect.ClassLoaderLock
Imports
org.apache.derby.iapi.services.locks.Lockable, .Latch, .VirtualLockTable, org.apache.derby.shared.common.sanity.SanityManager, java.util.Hashtable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
lockAttributes(int
use the bits in this int to decide if the user is interested in this kind of lockable object. The bits are defined in VirtualLockTable. For instance, the user may only ask for TABLE_AND_ROWLOCK and if this is not a table or row lock, then don't participate.
flag
,
Hashtable<String, Object>
if this decides to participate, put all relevant attributes into the Hashtable. The complete list of interesting attributes is listed in VirtualLockTable. The following attributes must be present for all participating lockables: VirtualLockTable.LOCKNAME, VirtualLockTable.LOCKTYPE, either VirtualLockTable.CONTAINERID or VirtualLockTable.CONGLOMID,

MT - this routine must be MP safe, caller will not be single threading the lock manager.

attributes
)

Implements org.apache.derby.iapi.services.locks.Lockable.lockAttributes.

This lockable want to participate in the Virtual LockTable when we want to print LATCH information.

public boolean
lockerAlwaysCompatible()

Implements org.apache.derby.iapi.services.locks.Lockable.lockerAlwaysCompatible.

Returns true if any lock request on a Lockable L in a compatibility space CS1 is compatible with any other lock held on L in CS1.

public void
lockEvent(Latch
Latch descriptor
lockInfo
)

Implements org.apache.derby.iapi.services.locks.Lockable.lockEvent.

Note the fact the object is locked.

public boolean
requestCompatible(Object
The desired qualifier
requestedQualifier
,
Object
The already granted qualifier
grantedQualifier
)

Implements org.apache.derby.iapi.services.locks.Lockable.requestCompatible.

Return true if the requested qualifier is compatible with the already granted qualifier.

public void
unlockEvent(Latch
Latch descriptor
lockInfo
)

Implements org.apache.derby.iapi.services.locks.Lockable.unlockEvent.

Note that the object has been unlocked

Must only be called by the lock manager.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ShExLockableback to summary
public ShExLockable()

Method Detail

lockAttributesback to summary
public boolean lockAttributes(int flag, Hashtable<String, Object> attributes)

Implements org.apache.derby.iapi.services.locks.Lockable.lockAttributes.

This lockable want to participate in the Virtual LockTable when we want to print LATCH information. Any lockable object which DOES NOT want to participate should override this function.

Parameters
flag:int

Doc from org.apache.derby.iapi.services.locks.Lockable.lockAttributes.

use the bits in this int to decide if the user is interested in this kind of lockable object. The bits are defined in VirtualLockTable. For instance, the user may only ask for TABLE_AND_ROWLOCK and if this is not a table or row lock, then don't participate.

attributes:Hashtable<String, Object>

Doc from org.apache.derby.iapi.services.locks.Lockable.lockAttributes.

if this decides to participate, put all relevant attributes into the Hashtable. The complete list of interesting attributes is listed in VirtualLockTable. The following attributes must be present for all participating lockables: VirtualLockTable.LOCKNAME, VirtualLockTable.LOCKTYPE, either VirtualLockTable.CONTAINERID or VirtualLockTable.CONGLOMID,

MT - this routine must be MP safe, caller will not be single threading the lock manager.

Returns:boolean

Doc from org.apache.derby.iapi.services.locks.Lockable.lockAttributes.

true if this object has diagnostic information to add to the virtual lock table. If this object either does not want to participate in the diagnostic virtual lock table or none of the attributes requested are attributes of this lock, returns false.

lockerAlwaysCompatibleback to summary
public boolean lockerAlwaysCompatible()

Implements org.apache.derby.iapi.services.locks.Lockable.lockerAlwaysCompatible.

Doc from org.apache.derby.iapi.services.locks.Lockable.lockerAlwaysCompatible.

Returns true if any lock request on a Lockable L in a compatibility space CS1 is compatible with any other lock held on L in CS1.

Returns:boolean

if any lock request is allowed

See Also
Lockable#lockerAlwaysCompatible
lockEventback to summary
public void lockEvent(Latch lockInfo)

Implements org.apache.derby.iapi.services.locks.Lockable.lockEvent.

Doc from org.apache.derby.iapi.services.locks.Lockable.lockEvent.

Note the fact the object is locked. Performs required actions to ensure that unlockEvent() work correctly. This method does not actually perform any locking of the object, the locking mechanism is provided by the lock manager.

If the class supports multiple lockers of the object then this method will be called once per locker, each with their own qualifier.

Must only be called by the lock manager. Synchronization will be handled by the lock manager.

Parameters
lockInfo:Latch

Latch descriptor

See Also
Lockable#lockEvent
requestCompatibleback to summary
public boolean requestCompatible(Object requestedQualifier, Object grantedQualifier)

Implements org.apache.derby.iapi.services.locks.Lockable.requestCompatible.

Doc from org.apache.derby.iapi.services.locks.Lockable.requestCompatible.

Return true if the requested qualifier is compatible with the already granted qualifier.

Parameters
requestedQualifier:Object

The desired qualifier

grantedQualifier:Object

The already granted qualifier

Returns:boolean

true if the request is compatible

See Also
Lockable#requestCompatible
unlockEventback to summary
public void unlockEvent(Latch lockInfo)

Implements org.apache.derby.iapi.services.locks.Lockable.unlockEvent.

Doc from org.apache.derby.iapi.services.locks.Lockable.unlockEvent.

Note that the object has been unlocked

Must only be called by the lock manager. Synchronization will be handled by the lock manager.

Parameters
lockInfo:Latch

Latch descriptor

See Also
Lockable#unlockEvent