Constructor and Description |
---|
AbstractRRD() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addDataSource(AbstractDS ds)
Adds the data source.
|
abstract void |
addRRA(AbstractRRA rra)
Adds the RRA.
|
protected abstract AbstractRRD |
createRRD()
Creates the RRD.
|
Row |
findRowByTimestamp(AbstractRRA rra,
Long timestamp)
Gets the row that corresponds to a specific time stamp (expressed in seconds since 1970-01-01 UTC).
|
Long |
findTimestampByRow(AbstractRRA rra,
Row row)
Finds the row time stamp, expressed in seconds since 1970-01-01 UTC.
|
boolean |
formatEquals(AbstractRRD rrd)
Format equals.
|
abstract AbstractDS |
getDataSource(int index)
Gets the data source.
|
abstract List<? extends AbstractDS> |
getDataSources()
Gets the data sources.
|
Long |
getEndTimestamp(AbstractRRA rra)
Gets the end time stamp, expressed in seconds since 1970-01-01 UTC.
|
protected int |
getIndex(String dsName)
Gets the index.
|
Long |
getLastUpdate()
Gets the last update.
|
AbstractRRA |
getMergeableRRA(AbstractRRA rraSrc)
Gets the mergeable RRA.
|
abstract List<? extends AbstractRRA> |
getRras()
Gets the RRAs.
|
Long |
getStartTimestamp(AbstractRRA rra)
Gets the start time stamp, expressed in seconds since 1970-01-01 UTC.
|
Long |
getStep()
Gets the step (interval) expressed in seconds.
|
String |
getVersion()
Gets the version of the RRD Dump.
|
boolean |
hasEqualsRras(AbstractRRD rrd)
Checks for equals RRAs.
|
boolean |
hasMergeableRRAs(AbstractRRD rrdSrc)
Checks for mergeable RRAs.
|
void |
merge(AbstractRRD rrdSrc)
Merge.
|
void |
merge(List<? extends AbstractRRD> rrdList)
Merge.
|
void |
reset()
Resets the row values for all the RRAs.
|
void |
setLastUpdate(Long lastUpdate)
Sets the last update.
|
void |
setStep(Long step)
Sets the step.
|
void |
setVersion(String version)
Sets the version.
|
List<AbstractRRD> |
split()
Split.
|
protected abstract AbstractRRD createRRD()
public abstract List<? extends AbstractDS> getDataSources()
public abstract List<? extends AbstractRRA> getRras()
public abstract void addRRA(AbstractRRA rra)
rra
- the RRApublic abstract void addDataSource(AbstractDS ds)
ds
- the DSpublic abstract AbstractDS getDataSource(int index)
index
- the indexpublic String getVersion()
public void setVersion(String version)
version
- the new versionpublic Long getStep()
public void setStep(Long step)
step
- the new steppublic Long getLastUpdate()
public void setLastUpdate(Long lastUpdate)
lastUpdate
- the new last updatepublic Long getStartTimestamp(AbstractRRA rra)
rra
- the RRApublic Long getEndTimestamp(AbstractRRA rra)
rra
- the RRApublic Long findTimestampByRow(AbstractRRA rra, Row row)
rra
- the RRA objectrow
- the Row objectpublic Row findRowByTimestamp(AbstractRRA rra, Long timestamp)
rra
- the RRAtimestamp
- the row time stamppublic void merge(AbstractRRD rrdSrc) throws IllegalArgumentException
Merge the content of rrdSrc into this RRD.
The format must be equal in order to perform the merge operation.
rrdSrc
- the RRD sourceIllegalArgumentException
- the illegal argument exceptionpublic boolean hasMergeableRRAs(AbstractRRD rrdSrc)
rrdSrc
- the RRD sourcepublic AbstractRRA getMergeableRRA(AbstractRRA rraSrc)
rraSrc
- the source RRApublic void merge(List<? extends AbstractRRD> rrdList) throws IllegalArgumentException
rrdList
- the RRD listIllegalArgumentException
- the illegal argument exceptionpublic List<AbstractRRD> split() throws IllegalArgumentException
If the RRD contain several data sources, it will return one RRD per DS. Otherwise, it will throw an exception.
IllegalArgumentException
- the illegal argument exceptionpublic boolean formatEquals(AbstractRRD rrd)
rrd
- the RRD objectpublic boolean hasEqualsRras(AbstractRRD rrd)
rrd
- the RRD objectpublic void reset()
Double.NaN will be stored on each slot
protected int getIndex(String dsName)
dsName
- the DS nameCopyright © 2021. All rights reserved.