|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.test.threadServices.MonitoredObject
public class MonitoredObject
This class represents an object and the threads waiting for it.
Constructor Summary | |
---|---|
MonitoredObject(java.lang.Object o)
Constructor. |
|
MonitoredObject(java.lang.Object o,
java.lang.Thread t)
Constructor. |
Method Summary | |
---|---|
boolean |
addThread(java.lang.Thread t)
Adds a certain Thread to the list of threads waiting for an object. |
java.util.Map<java.lang.String,java.lang.Thread> |
getMonitoringThreads()
Gets the Map storing threads waiting for an object notify or notifyAll. |
java.util.Iterator |
getMonitoringThreadsIterator()
Gets the list of threads waiting for an object notify or notifyAll. |
boolean |
isMonitoredBy(java.lang.Thread t)
Verifies if an object is monitored by a certain Thread. |
java.lang.String |
toString()
Gets a String that represents this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MonitoredObject(java.lang.Object o)
o
- The object being monitored.public MonitoredObject(java.lang.Object o, java.lang.Thread t)
o
- The object being monitored (where a wait was called).t
- The thread waiting for the object.Method Detail |
---|
public boolean isMonitoredBy(java.lang.Thread t)
t
- The Thread we want to know if it is monitored.
public boolean addThread(java.lang.Thread t)
t
- The Thread.
public java.util.Iterator getMonitoringThreadsIterator()
public java.util.Map<java.lang.String,java.lang.Thread> getMonitoringThreads()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |