Class AbstractRrdBasedFetchStrategy
- java.lang.Object
-
- org.opennms.netmgt.measurements.impl.AbstractRrdBasedFetchStrategy
-
- All Implemented Interfaces:
MeasurementFetchStrategy
- Direct Known Subclasses:
JrobinFetchStrategy
,JRrd2FetchStrategy
,RrdtoolXportFetchStrategy
public abstract class AbstractRrdBasedFetchStrategy extends java.lang.Object implements MeasurementFetchStrategy
Used to fetch measurements from RRD files.- Author:
- Jesse White
-
-
Constructor Summary
Constructors Constructor Description AbstractRrdBasedFetchStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FetchResults
fetch(long start, long end, long step, int maxrows, java.lang.Long interval, java.lang.Long heartbeat, java.util.List<Source> sources, boolean relaxed)
Fetches the measurements for the given sources.protected abstract FetchResults
fetchMeasurements(long start, long end, long step, int maxrows, java.util.Map<Source,java.lang.String> rrdsBySource, java.util.Map<java.lang.String,java.lang.Object> constants, QueryMetadata metadata)
Performs the actual retrieval of the values from the RRD/JRB files.
-
-
-
Method Detail
-
fetch
public FetchResults fetch(long start, long end, long step, int maxrows, java.lang.Long interval, java.lang.Long heartbeat, java.util.List<Source> sources, boolean relaxed) throws java.lang.Exception
Fetches the measurements for the given sources.- Specified by:
fetch
in interfaceMeasurementFetchStrategy
- Parameters:
start
- timestamp in millisecondsend
- timestamp in millisecondsstep
- desired resolution in milliseconds - actual resolution might differmaxrows
- maximum number of rows - no limit when <= 0interval
- duration in milliseconds, used by strategies that implement late aggregationheartbeat
- duration in milliseconds, used by strategies that implement late aggregationsources
- array of sources - these should have unique labelsrelaxed
- iffalse
a missing source results in a return ofnull
.true
on the other hand ignores that source.- Returns:
- null when a resource id or attribute cannot be found
- Throws:
java.lang.Exception
-
fetchMeasurements
protected abstract FetchResults fetchMeasurements(long start, long end, long step, int maxrows, java.util.Map<Source,java.lang.String> rrdsBySource, java.util.Map<java.lang.String,java.lang.Object> constants, QueryMetadata metadata) throws org.jrobin.core.RrdException
Performs the actual retrieval of the values from the RRD/JRB files.- Throws:
org.jrobin.core.RrdException
-
-