Class ObjectLock


  • public final class ObjectLock
    extends Object
    Locker of class.
    • Constructor Detail

      • ObjectLock

        public ObjectLock​(ObjectID objectID)
        Constructor
        Parameters:
        objectID - ID of the locker.
    • Method Detail

      • lock

        public void lock()
        Lock class.
      • getNumThreadsWaiting

        public int getNumThreadsWaiting()
        Get number of threads waiting.
        Returns:
        number of threads waiting
      • unlock

        public void unlock()
        Unlock class.
      • getObjectID

        public ObjectID getObjectID()
        Get class id of locker
        Returns:
        ID of the object