Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime
In directory usw-pr-cvs1:/tmp/cvs-serv10746
Modified Files:
ThreadR.java
Log Message:
added isActive method
Index: ThreadR.java
===================================================================
RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ThreadR.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** ThreadR.java 24 Jul 2002 22:29:03 -0000 1.12
--- ThreadR.java 29 Jul 2002 15:07:57 -0000 1.13
***************
*** 60,63 ****
--- 60,66 ----
private ThreadRef parent;
+ // activeness info
+ private boolean active;
+
// memory info
private long numLiveInstances;
***************
*** 303,306 ****
--- 306,317 ----
}
+ /** Returns true if this thread is in a state after THREAD_START and before
+ * THREAD_END.
+ */
+ public boolean isActive() {
+ conditionalRefresh(IProf.ALLOC_DATA);
+ return active;
+ }
+
// refresh
***************
*** 436,439 ****
--- 447,451 ----
throw new RuntimeException(e.getMessage());
}
+ setActive(data.active);
switch (what) {
case IProf.ALLOC_DATA:
***************
*** 500,507 ****
--- 512,525 ----
}
+ /** Sets the value of the <code>active</code> atribute. */
+ private void setActive(boolean ac) {
+ active=ac;
+ }
+
/** Fills object with data gained from profiled VM.
* @param sid Object info and data.
*/
void setData(IProf.sID sid) {
+ setActive(sid.active);
// We get only alloc data
setData(sid.alloc);
|