Package org.playorm.cron.impl.db

Examples of org.playorm.cron.impl.db.MonitorDbo


    NoSqlEntityManager mgr = factory.createEntityManager();
    Cursor<KeyValue<MonitorDbo>> cursor = mgr.findAll(MonitorDbo.class, ids);
    List<PlayOrmCronJob> monitors = new ArrayList<PlayOrmCronJob>();
    while(cursor.next()) {
      KeyValue<MonitorDbo> kv = cursor.getCurrent();
      MonitorDbo mon = kv.getValue();
      monitors.add(CopyUtil.copy(mon));
    }
    return monitors;
  }
View Full Code Here


    if (log.isInfoEnabled())
      log.info("num up nodes="+numUpWebNodes+" servernum="+serverNumber);
    Cursor<KeyValue<MonitorDbo>> cursor = MonitorDbo.findAll(mgr);
    while(cursor.next()) {
      KeyValue<MonitorDbo> kv = cursor.getCurrent();
      MonitorDbo val = kv.getValue();
      if (val == null)
        continue;
      String id = val.getId();
      int hash = id.hashCode();
      int serverNum = hashGen.generate(hash, numUpWebNodes);
      if (log.isInfoEnabled())
        log.info("monitor="+val.getId()+" target server num="+serverNum+" our servernum="+serverNumber);
      if(serverNum == serverNumber)
        processMonitor(mgr, val);
    }
  }
View Full Code Here

TOP

Related Classes of org.playorm.cron.impl.db.MonitorDbo

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.