public class Monitor extends Object implements Cloneable
Constructor and Description |
---|
Monitor()
Creates a new empty monitor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canLock(ThreadInfo th)
Returns true if it is possible to lock the monitor.
|
Monitor |
clone() |
void |
dump() |
boolean |
equals(Object o)
Compares to another object.
|
ThreadInfo[] |
getBlockedOrWaitingThreads() |
ThreadInfo[] |
getBlockedThreads() |
int |
getLockCount()
Returns the number of nested locks acquired.
|
ThreadInfo[] |
getLockedThreads()
Returns the list of locked threads
|
ThreadInfo |
getLockingThread()
Returns the identifier of the thread holding the lock.
|
int |
getNumberOfBlockedOrWaitingThreads() |
int |
getNumberOfBlockedThreads() |
int |
getNumberOfWaitingThreads() |
ThreadInfo[] |
getWaitingThreads() |
void |
hash(HashData hd) |
int |
hashCode() |
boolean |
hasLockedThreads() |
boolean |
hasWaitingThreads() |
boolean |
isLocking(ThreadInfo ti) |
int |
objectHashCode() |
void |
printFields(PrintWriter pw) |
public void printFields(PrintWriter pw)
public void dump()
public boolean equals(Object o)
public void hash(HashData hd)
public int getLockCount()
public ThreadInfo getLockingThread()
public ThreadInfo[] getLockedThreads()
public boolean hasLockedThreads()
public boolean hasWaitingThreads()
public int getNumberOfWaitingThreads()
public ThreadInfo[] getWaitingThreads()
public int getNumberOfBlockedThreads()
public ThreadInfo[] getBlockedThreads()
public int getNumberOfBlockedOrWaitingThreads()
public ThreadInfo[] getBlockedOrWaitingThreads()
public boolean canLock(ThreadInfo th)
public int objectHashCode()
public boolean isLocking(ThreadInfo ti)