Documentation of 'org.apache.derby.impl.services.locks.ActiveLock' Java class
ActiveLock
org.apache.derby.impl.services.locks

Class ActiveLock

  • All Implemented Interfaces:
    Latch, Control


    public final class ActiveLock
    extends java.lang.Object
    A Lock represents a granted or waiting lock request.
    MT - Mutable - Immutable identity : Thread Aware
    • Method Detail

      • getQualifier

        public final java.lang.Object getQualifier()
        Return the qualifier lock was obtained with. MT - Thread safe
        Specified by:
        getQualifier in interface Latch
      • getCount

        public final int getCount()
        Return the count of locks. MT - Thread safe
        Specified by:
        getCount in interface Latch
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getLockControl

        public org.apache.derby.impl.services.locks.LockControl getLockControl()
        Specified by:
        getLockControl in interface Control
      • getLock

        public org.apache.derby.impl.services.locks.Lock getLock(CompatibilitySpace compatibilitySpace,
                                                                 java.lang.Object qualifier)
        Specified by:
        getLock in interface Control
      • 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:
        shallowClone in interface Control
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Control
      • unlock

        public boolean unlock(Latch lockInGroup,
                              int unlockCount)
        Specified by:
        unlock in interface Control
      • addWaiters

        public void addWaiters(java.util.Map waiters)
        Specified by:
        addWaiters in interface Control
      • getFirstGrant

        public org.apache.derby.impl.services.locks.Lock getFirstGrant()
        Specified by:
        getFirstGrant in interface Control
      • getGranted

        public java.util.List getGranted()
        Specified by:
        getGranted in interface Control
      • getWaiting

        public java.util.List getWaiting()
        Specified by:
        getWaiting in interface Control
      • isGrantable

        public boolean isGrantable(boolean noWaitersBeforeMe,
                                   CompatibilitySpace compatibilitySpace,
                                   java.lang.Object requestQualifier)
        Specified by:
        isGrantable in interface Control

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.