Tabnine Logo
org.rrd4j.core
Code IndexAdd Tabnine to your IDE (free)

How to use org.rrd4j.core

Best Java code snippets using org.rrd4j.core (Showing top 20 results out of 315)

origin: org.rrd4j/rrd4j

void appendXml(XmlWriter writer) throws IOException {
  writer.writeComment(signature.get());
  writer.writeTag("version", RRDTOOL_VERSION3);
  writer.writeComment("Seconds");
  writer.writeTag("step", step.get());
  writer.writeComment(Util.getDate(lastUpdateTime.get()));
  writer.writeTag("lastupdate", lastUpdateTime.get());
}
origin: org.rrd4j/rrd4j

/**
 * Returns current ending timestamp. This value is not constant.
 *
 * @return Timestamp corresponding to the last archive row
 * @throws java.io.IOException Thrown in case of I/O error.
 */
public long getEndTime() throws IOException {
  long arcStep = getArcStep();
  long lastUpdateTime = parentDb.getHeader().getLastUpdateTime();
  return Util.normalize(lastUpdateTime, arcStep);
}
origin: org.rrd4j/rrd4j

String dump() throws IOException {
  return "== DATASOURCE ==\n" +
      "DS:" + dsName.get() + ":" + dsType.name() + ":" +
      heartbeat.get() + ":" + minValue.get() + ":" +
      maxValue.get() + "\nlastValue:" + lastValue.get() +
      " nanSeconds:" + nanSeconds.get() +
      " accumValue:" + accumValue.get() + "\n";
}
origin: org.rrd4j/rrd4j

Datasource(RrdDb parentDb, DataImporter reader, int dsIndex) throws IOException {
  this(parentDb, null);
  dsName.set(reader.getDsName(dsIndex));
  dsType.set(reader.getDsType(dsIndex));
  heartbeat.set(reader.getHeartbeat(dsIndex));
  minValue.set(reader.getMinValue(dsIndex));
  maxValue.set(reader.getMaxValue(dsIndex));
  lastValue.set(reader.getLastValue(dsIndex));
  accumValue.set(reader.getAccumValue(dsIndex));
  nanSeconds.set(reader.getNanSeconds(dsIndex));
}
origin: org.rrd4j/rrd4j

void appendXml(XmlWriter writer) throws IOException {
  writer.startTag("ds");
  writer.writeTag("name", dsName.get());
  writer.writeTag("type", dsType.name());
  writer.writeTag("minimal_heartbeat", heartbeat.get());
  writer.writeTag("min", minValue.get());
  writer.writeTag("max", maxValue.get());
  writer.writeComment("PDP Status");
  writer.writeTag("last_ds", lastValue.get(), "UNKN");
  writer.writeTag("value", accumValue.get());
  writer.writeTag("unknown_sec", nanSeconds.get());
  writer.closeTag();  // ds
}
origin: org.fusesource.rrd4j/rrd4j

String dump() throws IOException {
  StringBuilder sb = new StringBuilder("== ARCHIVE ==\n");
  sb.append("RRA:").append(consolFun.get()).append(":").append(xff.get()).append(":").append(steps.get()).append(":").append(rows.get()).append("\n");
  sb.append("interval [").append(getStartTime()).append(", ").append(getEndTime()).append("]" + "\n");
  for (int i = 0; i < robins.length; i++) {
    sb.append(states[i].dump());
    sb.append(robins[i].dump());
  }
  return sb.toString();
}
origin: org.rrd4j/rrd4j

FetchData(Archive matchingArchive, FetchRequest request) throws IOException {
  this.matchingArchive = matchingArchive;
  this.arcStep = matchingArchive.getArcStep();
  this.arcEndTime = matchingArchive.getEndTime();
  this.dsNames = request.getFilter();
  if (this.dsNames == null) {
    this.dsNames = matchingArchive.getParentDb().getDsNames();
  }
  this.request = request;
}
origin: org.rrd4j/rrd4j

Def(String name, String dsName, FetchData fetchData) {
  this(name,
      fetchData.getRequest().getParentDb().getPath(),
      dsName, fetchData.getRequest().getConsolFun(),
      fetchData.getRequest().getParentDb().getRrdBackend().getFactory()
      );
  this.fetchData = fetchData;
}
origin: org.fusesource.rrd4j/rrd4j

RrdNode(RrdDb rrd, int dsIndex, int arcIndex) throws IOException {
  // archive node
  this.dsIndex = dsIndex;
  this.arcIndex = arcIndex;
  ArcDef[] arcDefs = rrd.getRrdDef().getArcDefs();
  label = arcDefs[arcIndex].dump();
}
origin: org.rrd4j/rrd4j

void appendXml(XmlWriter writer) throws IOException {
  writer.startTag("ds");
  writer.writeTag("value", accumValue.get());
  writer.writeTag("unknown_datapoints", nanSteps.get());
  writer.closeTag(); // ds
}
origin: org.rrd4j/rrd4j

RrdPrimitive(RrdUpdater<U> updater, int type, int count, boolean isConstant) throws IOException {
  this.backend = updater.getRrdBackend();
  this.byteCount = RRD_PRIM_SIZES[type] * count;
  this.pointer = updater.getRrdAllocator().allocate(byteCount);
  this.cachingAllowed = isConstant || backend.isCachingAllowed();
}
origin: org.fusesource.rrd4j/rrd4j

final void archive(Datasource datasource, double value, long numUpdates) throws IOException {
  int dsIndex = getDsIndex(datasource.getName());
  for (Archive archive : archives) {
    archive.archive(dsIndex, value, numUpdates);
  }
}
origin: org.rrd4j/rrd4j

/**
 * Returns archive time step in seconds. Archive step is equal to RRD step
 * multiplied with the number of archive steps.
 *
 * @return Archive time step in seconds
 * @throws java.io.IOException Thrown in case of I/O error.
 */
public long getArcStep() throws IOException {
  return parentDb.getHeader().getStep() * steps.get();
}
origin: org.fusesource.rrd4j/rrd4j

String dump() throws IOException {
  return "== DATASOURCE ==\n" +
      "DS:" + dsName.get() + ":" + dsType.get() + ":" +
      heartbeat.get() + ":" + minValue.get() + ":" +
      maxValue.get() + "\nlastValue:" + lastValue.get() +
      " nanSeconds:" + nanSeconds.get() +
      " accumValue:" + accumValue.get() + "\n";
}
origin: org.rrd4j/rrd4j

void validateHeader() throws IOException {
  if (!isRrd4jHeader()) {
    throw new InvalidRrdException("Invalid file header. File [" + parentDb.getCanonicalPath() + "] is not a RRD4J RRD file");
  }
}
origin: org.fusesource.rrd4j/rrd4j

Datasource(RrdDb parentDb, DataImporter reader, int dsIndex) throws IOException {
  this(parentDb, null);
  dsName.set(reader.getDsName(dsIndex));
  dsType.set(reader.getDsType(dsIndex));
  heartbeat.set(reader.getHeartbeat(dsIndex));
  minValue.set(reader.getMinValue(dsIndex));
  maxValue.set(reader.getMaxValue(dsIndex));
  lastValue.set(reader.getLastValue(dsIndex));
  accumValue.set(reader.getAccumValue(dsIndex));
  nanSeconds.set(reader.getNanSeconds(dsIndex));
}
origin: org.fusesource.rrd4j/rrd4j

void appendXml(XmlWriter writer) throws IOException {
  writer.writeComment(signature.get());
  writer.writeTag("version", RRDTOOL_VERSION);
  writer.writeComment("Seconds");
  writer.writeTag("step", step.get());
  writer.writeComment(Util.getDate(lastUpdateTime.get()));
  writer.writeTag("lastupdate", lastUpdateTime.get());
}
origin: org.fusesource.rrd4j/rrd4j

/**
 * Returns current ending timestamp. This value is not constant.
 *
 * @return Timestamp corresponding to the last archive row
 * @throws IOException Thrown in case of I/O error.
 */
public long getEndTime() throws IOException {
  long arcStep = getArcStep();
  long lastUpdateTime = parentDb.getHeader().getLastUpdateTime();
  return Util.normalize(lastUpdateTime, arcStep);
}
origin: org.fusesource.rrd4j/rrd4j

void appendXml(XmlWriter writer) throws IOException {
  writer.startTag("ds");
  writer.writeTag("value", accumValue.get());
  writer.writeTag("unknown_datapoints", nanSteps.get());
  writer.closeTag(); // ds
}
origin: org.fusesource.rrd4j/rrd4j

RrdPrimitive(RrdUpdater updater, int type, int count, boolean isConstant) throws IOException {
  this.backend = updater.getRrdBackend();
  this.byteCount = RRD_PRIM_SIZES[type] * count;
  this.pointer = updater.getRrdAllocator().allocate(byteCount);
  this.cachingAllowed = isConstant || backend.isCachingAllowed();
}
org.rrd4j.core

Most used classes

  • RrdDb
    Main class used to create and manipulate round robin databases (RRDs). Use this class to perform upd
  • RrdDef
    Class to represent definition of new Round Robin Database (RRD). Object of this class is used to cre
  • Util
    Class defines various utility functions used in Rrd4j.
  • Sample
    Class to represent data source values for the given timestamp. Objects of this class are never creat
  • ArcDef
    Class to represent single archive definition within the RRD. Archive definition consists of the foll
  • FetchData,
  • FetchRequest,
  • Datasource,
  • RrdBackendFactory,
  • RrdDbPool,
  • ArcState,
  • Archive,
  • Header,
  • Robin,
  • RrdDefTemplate,
  • XmlTemplate,
  • DataChunk,
  • DataSource,
  • PDPStatusBlock
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now