org.apache.derby.impl.services.locks
Class ActiveLock
- java.lang.Object
-
- org.apache.derby.impl.services.locks.ActiveLock
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddWaiters(java.util.Map waiters)booleanequals(java.lang.Object other)ActiveLockfirstWaiter()CompatibilitySpacegetCompatabilitySpace()Return the compatibility space this lock is held in.intgetCount()Return the count of locks.org.apache.derby.impl.services.locks.LockgetFirstGrant()java.util.ListgetGranted()org.apache.derby.impl.services.locks.LockgetLock(CompatibilitySpace compatibilitySpace, java.lang.Object qualifier)LockablegetLockable()Return the object this lock is held on MT - Thread safeorg.apache.derby.impl.services.locks.LockControlgetLockControl()java.lang.ObjectgetQualifier()Return the qualifier lock was obtained with.java.util.ListgetWaiting()inthashCode()booleanisEmpty()booleanisGrantable(boolean noWaitersBeforeMe, CompatibilitySpace compatibilitySpace, java.lang.Object requestQualifier)ControlshallowClone()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.booleanunlock(Latch lockInGroup, int unlockCount)
-
-
-
Method Detail
-
getLockable
public final Lockable getLockable()
Return the object this lock is held on MT - Thread safe- Specified by:
getLockablein interfaceLatch- Specified by:
getLockablein interfaceControl
-
getCompatabilitySpace
public final CompatibilitySpace getCompatabilitySpace()
Return the compatibility space this lock is held in. MT - Thread safe- Specified by:
getCompatabilitySpacein interfaceLatch
-
getQualifier
public final java.lang.Object getQualifier()
Return the qualifier lock was obtained with. MT - Thread safe- Specified by:
getQualifierin interfaceLatch
-
getCount
public final int getCount()
Return the count of locks. MT - Thread safe
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
getLockControl
public org.apache.derby.impl.services.locks.LockControl getLockControl()
- Specified by:
getLockControlin interfaceControl
-
getLock
public org.apache.derby.impl.services.locks.Lock getLock(CompatibilitySpace compatibilitySpace, java.lang.Object qualifier)
-
shallowClone
public 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.- Specified by:
shallowClonein interfaceControl
-
firstWaiter
public ActiveLock firstWaiter()
- Specified by:
firstWaiterin interfaceControl
-
unlock
public boolean unlock(Latch lockInGroup, int unlockCount)
-
addWaiters
public void addWaiters(java.util.Map waiters)
- Specified by:
addWaitersin interfaceControl
-
getFirstGrant
public org.apache.derby.impl.services.locks.Lock getFirstGrant()
- Specified by:
getFirstGrantin interfaceControl
-
getGranted
public java.util.List getGranted()
- Specified by:
getGrantedin interfaceControl
-
getWaiting
public java.util.List getWaiting()
- Specified by:
getWaitingin interfaceControl
-
isGrantable
public boolean isGrantable(boolean noWaitersBeforeMe, CompatibilitySpace compatibilitySpace, java.lang.Object requestQualifier)- Specified by:
isGrantablein interfaceControl
-
-
DataMelt 3.0 © DataMelt by jWork.ORG