Exemplo n.º 1
0
  protected void testPegChain(Chain chain) {
    System.out.println("******** chain********");
    Iterator it = chain.iterator();
    while (it.hasNext()) {
      /*Object o = it.next();
      System.out.println(o);
      if (!(o instanceof JPegStmt))  System.out.println("not instanceof JPegStmt: "+o);
      JPegStmt s = (JPegStmt)o;
      */
      JPegStmt stmt = (JPegStmt) it.next();
      System.out.println(stmt.toString());
      /*if (stmt.getName().equals("start")){

      System.out.println("find start method in : " + stmt.toString() );
      List list =(List)startToThread.get(stmt);
      Iterator chainIt = list.iterator();
      while (chainIt.hasNext()){
      Chain chain = (Chain)chainIt.next();
      Iterator subit = chain.iterator();
      while (subit.hasNext()){
      System.out.println("**" + ((JPegStmt)subit.next()).toString());
      }
      }
      System.out.println("$$$$$$returing to main chain");
      }
      */
    }
  }
Exemplo n.º 2
0
  public void testWaitingNodes() {
    System.out.println("------waiting---begin");
    Set maps = waitingNodes.entrySet();
    for (Iterator iter = maps.iterator(); iter.hasNext(); ) {
      Map.Entry entry = (Map.Entry) iter.next();
      System.out.println("---key=  " + entry.getKey());
      FlowSet fs = (FlowSet) entry.getValue();
      if (fs.size() > 0) {

        System.out.println("**waiting nodes set:");
        Iterator it = fs.iterator();
        while (it.hasNext()) {
          JPegStmt unit = (JPegStmt) it.next();

          System.out.println(unit.toString());
        }
      }
    }
    System.out.println("------------waitingnodes---ends--------");
  }