Package center.task.prm

Examples of center.task.prm.Saved


  public final void saveParams(Saved.TIME tm) {
    ATaskInfo info = getTaskInfo();
    ArrayList<Saved> saves = new ArrayList<Saved>();
    String k;
    Object o;
    Saved s;
    Saved.TIME t;
    int p;
    int i;
    for (Map.Entry<String, Object> e : info.prms.entrySet()) {
      k = e.getKey();
      o = e.getValue();
      if (o != null && o instanceof Saved) {
        s = (Saved) o;
        t = s.timeSaved();
        p = s.priority();
        if (t != null && t.equals(tm)) {
          i = 0;
          for (; i < saves.size(); i++)
            if (saves.get(i).priority() >= p) {
              saves.add(i, s);
              break;
            }
          if (i >= saves.size())
            saves.add(s);
        }
      }
    }
    for (i = 0; i < saves.size(); i++)
      try {
        s = saves.get(i);
        //System.out.println("=======SAVE===== " + ((IDependentParam)s).getGLName());
        s.save(cntx);
      } catch (SysException ex) {
        ex.printStackTrace();
      }
  }
View Full Code Here


    for (Iterator<String> e = info.prms.keySet().iterator(); e.hasNext();)
      try {
        String k = e.next();
        Object o = info.prms.get(k);
        if (o != null && o instanceof Saved) {
          Saved s = (Saved) o;
          Saved.TIME t = s.timeSaved();
          if (t != null && t.equals(tm)) {
            Process prc = pool.occupy();
            if (prc != null) {
              Method m;
              try {
                m = s.getClass().getMethod("save", Context.class);
                list.add(prc.startMethod(m, s, cntx));
              } catch (SecurityException e1) {
                e1.printStackTrace();
              } catch (NoSuchMethodException e1) {
                e1.printStackTrace();
              } finally {
                pool.free(prc);
              }
            } else {
              s.save(cntx);
            }
          }
        }
      } catch (SysException ex) {
        ex.printStackTrace();
View Full Code Here

TOP

Related Classes of center.task.prm.Saved

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.