Package es.bsc.dataclay.heap
Class ObjectLock
- java.lang.Object
-
- es.bsc.dataclay.heap.ObjectLock
-
public final class ObjectLock extends Object
Locker of class.
-
-
Constructor Summary
Constructors Constructor Description ObjectLock(ObjectID objectID)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumThreadsWaiting()
Get number of threads waiting.ObjectID
getObjectID()
Get class id of lockervoid
lock()
Lock class.void
unlock()
Unlock 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
-
-