Exemplo n.º 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;
  }
Exemplo n.º 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;
  }
Exemplo n.º 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;
 }