Replace old jrobin with rrd4j 3.5 (ticket #2684)

2019-02-10
From https://github.com/rrd4j/rrd4j/releases
Copyright (c) 2001-2005 Sasa Markovic and Ciaran Treanor.
Copyright (c) 2011 The OpenNMS Group, Inc.
Copyright 2011 The RRD4J Authors.
Apache 2.0 and LGPLv2.1

Unmodified as a base for future merges, except for omitted
files listed below.
This rev will not work; font patch to follow in next revision.

Following directories and files omitted:
converter/
core/RrdBerkeleyDbBackendFactory.java
core/RrdBerkeleyDbBackend.java
core/RrdMongoDBBackendFactory.java
core/RrdMongoDBBackend.java
demo/
graph/RrdGraphDefTemplate.java
inspector/
eu/bengreen/data/utility/
This commit is contained in:
zzz
2020-02-25 14:04:21 +00:00
parent 4826bbd333
commit 5bed4a0d7f
188 changed files with 8582 additions and 24540 deletions

View File

@@ -0,0 +1,59 @@
package org.rrd4j.data;
abstract class Source {
private final String name;
protected double[] values;
protected long[] timestamps;
Source(String name) {
this.name = name;
}
String getName() {
return name;
}
void setValues(double[] values) {
this.values = values;
}
void setTimestamps(long[] timestamps) {
this.timestamps = timestamps;
}
double[] getValues() {
return values;
}
long[] getTimestamps() {
return timestamps;
}
/**
* @param tStart
* @param tEnd
* @return
* @deprecated This method is deprecated. Uses instance of {@link org.rrd4j.data.Variable}, used with {@link org.rrd4j.data.DataProcessor.addDatasource(String, String, Variable)}
*/
@Deprecated
Aggregates getAggregates(long tStart, long tEnd) {
Aggregator agg = new Aggregator(timestamps, values);
return agg.getAggregates(tStart, tEnd);
}
/**
* @param tStart
* @param tEnd
* @param percentile
* @return
* @deprecated This method is deprecated. Uses instance of {@link org.rrd4j.data.Variable.PERCENTILE}, used with {@link org.rrd4j.data.DataProcessor.addDatasource(String, String, Variable)}
*/
@Deprecated
double getPercentile(long tStart, long tEnd, double percentile) {
Variable vpercent = new Variable.PERCENTILE((float) percentile);
vpercent.calculate(this, tStart, tEnd);
return vpercent.getValue().value;
}
}