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 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 FetchResultsfetch(long start, long end, long step, int maxrows, Long interval, Long heartbeat, List<Source> sources, boolean relaxed)Fetches the measurements for the given sources.protected abstract FetchResultsfetchMeasurements(long start, long end, long step, int maxrows, Map<Source,String> rrdsBySource, Map<String,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, Long interval, Long heartbeat, List<Source> sources, boolean relaxed) throws Exception
Fetches the measurements for the given sources.- Specified by:
fetchin 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- iffalsea missing source results in a return ofnull.trueon the other hand ignores that source.- Returns:
- null when a resource id or attribute cannot be found
- Throws:
Exception
-
fetchMeasurements
protected abstract FetchResults fetchMeasurements(long start, long end, long step, int maxrows, Map<Source,String> rrdsBySource, Map<String,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
-
-