Package org.apache.kato.katoview.commands.helpers

Examples of org.apache.kato.katoview.commands.helpers.MonitorState


    while (itMonitor.hasNext()) {
      JavaMonitor jm = (JavaMonitor)itMonitor.next();
      Iterator itEnterWaiter = jm.getEnterWaiters().iterator();
      while (itEnterWaiter.hasNext()) {
        JavaThread jt = (JavaThread)itEnterWaiter.next();
        monitors.put(jt, new MonitorState(jm, MonitorState.WAITING_TO_ENTER));
      }
      Iterator itNotifyWaiter = jm.getNotifyWaiters().iterator();
      while (itNotifyWaiter.hasNext()) {
        JavaThread jt = (JavaThread)itNotifyWaiter.next();
        monitors.put(jt, new MonitorState(jm, MonitorState.WAITING_TO_BE_NOTIFIED_ON));
      }
    }
   
    return monitors;
  }
View Full Code Here


      out.print(Exceptions.getCorruptDataExceptionString());
    }
    out.print("\n");
   
    out.print("\t    monitor:       ");
    MonitorState ms = (MonitorState)monitors.get(jt);
    if (null == ms) {
      out.print("<no associated monitor>");
    } else {
      try {
        String name = ms.getMonitor().getName();
        if (name.equals("")) {
          name = "<unnamed>";
        }
        out.print(ms.getStatusString() + " \"" + name + "\"");
      } catch (CorruptDataException cde) {
        out.print(Exceptions.getCorruptDataExceptionString());
      }
      JavaObject jo = ms.getMonitor().getObject();
      if (null == jo) {
        // working with a raw monitor
        out.print(" with ID ");
        // FIXME: once Kato implements IDs, output ID
        out.print("<unavailable>");
View Full Code Here

TOP

Related Classes of org.apache.kato.katoview.commands.helpers.MonitorState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.