Пример #1
0
  @Override
  public List<ISensor> getSensors() {
    long before = System.currentTimeMillis();

    List<ISensor> sensors = JDOStorageZone.getInstance().getSensors(this);

    long after = System.currentTimeMillis();
    log.info("getSensors " + name + " taken ms:" + (after - before));
    return sensors;
  }
Пример #2
0
  @Override
  public List<IZone> getSubZones() {
    long before = System.currentTimeMillis();

    List<IZone> childs = JDOStorageZone.getInstance().getSubZones(this);

    long after = System.currentTimeMillis();
    log.info("getSubzone " + name + " taken ms:" + (after - before));
    return childs;
  }
Пример #3
0
 @Override
 public IZone getParentZone() {
   Zone p = null;
   if (parentKey != null) {
     try {
       p = JDOStorageZone.getInstance().getById(parentKey, this.getClass());
     } catch (Exception e) {
       log.log(Level.WARNING, "Error retrieving parent zone", e);
     }
   }
   return p;
 }