Examples of MonitoringData


Examples of de.scoopgmbh.copper.monitoring.core.model.MonitoringData

      out.putInt(LIMIT_POSITION,FIRST_RECORD_POSITION);
        bostr = new ByteBufferOutputStream(out);
        output = new Output(bostr);
      kryo = SerializeUtil.createKryo();
     
      MonitoringData md = null;
      Output o = new Output(nullOut);
      while ((md = of.pop()) != null) {
        kryo.writeClassAndObject(o,  md);
      }
    }
View Full Code Here

Examples of de.scoopgmbh.copper.monitoring.core.model.MonitoringData

    private void readData(Input i, Kryo kryo, long fromTime, long toTime, final boolean reverse) {
      monitoringDataList = new ArrayList<MonitoringData>();
      try {
        while (i.available() > 0){
          MonitoringData data = (MonitoringData)kryo.readClassAndObject(i);
          if (data.getTimeStamp().getTime() <= toTime && data.getTimeStamp().getTime()  >= fromTime) {
            monitoringDataList.add(data);
          }
        }
      } catch (IOException e) {
        throw new RuntimeException(e);
View Full Code Here

Examples of de.scoopgmbh.copper.monitoring.core.model.MonitoringData

            openFiles();
            return (nextElement = popNext()) != null;
          }

          private MonitoringData popNext()  {
            MonitoringData monitoringData = null;
            OpenedFile dpSource = null;
            ListIterator<OpenedFile> it = openFiles.listIterator();
            while (it.hasNext()) {
              OpenedFile of = it.next();
              MonitoringData nextDp = of.pop();
              if (nextDp == null) {
                it.remove();
                continue;
              }
              if (monitoringData == null || ((!reverse && nextDp.getTimeStamp().getTime() < monitoringData.getTimeStamp().getTime()) || (reverse && nextDp.getTimeStamp().getTime() > monitoringData.getTimeStamp().getTime()))) {
                if (monitoringData != null) {
                  dpSource.push(monitoringData);
                }
                dpSource = of;
                monitoringData = nextDp;
              }
            }
            if (monitoringData != null) {
              currentTimestamp = monitoringData.getTimeStamp().getTime();
              if (!files.isEmpty() && ((!reverse && files.get(0).earliestTimestamp < currentTimestamp) || (reverse && files.get(0).latestTimestamp > currentTimestamp))) {
                dpSource.push(monitoringData);
                openFiles();
                return popNext();
              }             
            } else if (!files.isEmpty()) {
              currentTimestamp = reverse?files.get(0).latestTimestamp:files.get(0).earliestTimestamp;
              openFiles();
              return popNext();
            }

            return monitoringData;
          }

          @Override
          public MonitoringData next() {
            if (!hasNext())
              throw new NoSuchElementException();
            MonitoringData next = nextElement;
            nextElement = null;
            return next;
          }

          @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.