Package org.opennms.netmgt.rrd.model.v3
Class RRA
- java.lang.Object
-
- org.opennms.netmgt.rrd.model.AbstractRRA
-
- org.opennms.netmgt.rrd.model.v3.RRA
-
public class RRA extends AbstractRRA
The Class RRA (Round Robin Archives).- Author:
- Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description RRA()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractRRA
createSingleRRA(int dsIndex)
Creates a RRA with a single data source.boolean
formatEquals(RRA rra)
Format equals.boolean
formatMergeable(AbstractRRA sourceRra)
Format mergeable.CFType
getConsolidationFunction()
Gets the consolidation function.java.util.List<RRADS>
getDataSources()
Gets the data sources.Parameters
getParameters()
Gets the parameters.boolean
hasAverageAsCF()
Checks for average as consolidation function.void
setConsolidationFunction(java.lang.String consolidationFunction)
Sets the consolidation function.void
setConsolidationFunction(CFType consolidationFunction)
Sets the consolidation function.void
setDataSources(java.util.List<RRADS> dataSources)
Sets the data sources.void
setParameters(Parameters parameters)
Sets the parameters.-
Methods inherited from class org.opennms.netmgt.rrd.model.AbstractRRA
formatEquals, getPdpPerRow, getRows, setPdpPerRow, setRows
-
-
-
-
Method Detail
-
getConsolidationFunction
public CFType getConsolidationFunction()
Gets the consolidation function.- Returns:
- the consolidation function
-
setConsolidationFunction
public void setConsolidationFunction(CFType consolidationFunction)
Sets the consolidation function.- Parameters:
consolidationFunction
- the new consolidation function
-
setConsolidationFunction
public void setConsolidationFunction(java.lang.String consolidationFunction)
Sets the consolidation function.- Parameters:
consolidationFunction
- the new consolidation function
-
getParameters
public Parameters getParameters()
Gets the parameters.- Returns:
- the parameters
-
setParameters
public void setParameters(Parameters parameters)
Sets the parameters.- Parameters:
parameters
- the new parameters
-
getDataSources
public java.util.List<RRADS> getDataSources()
Gets the data sources.- Returns:
- the data sources
-
setDataSources
public void setDataSources(java.util.List<RRADS> dataSources)
Sets the data sources.- Parameters:
dataSources
- the new data sources
-
formatEquals
public boolean formatEquals(RRA rra)
Format equals. TODO: Check the parameters and the RRA data sources- Parameters:
rra
- the RRA object- Returns:
- true, if successful
-
createSingleRRA
protected AbstractRRA createSingleRRA(int dsIndex) throws java.lang.IllegalArgumentException
Description copied from class:AbstractRRA
Creates a RRA with a single data source.- Specified by:
createSingleRRA
in classAbstractRRA
- Parameters:
dsIndex
- the RRA-DS index- Returns:
- the abstract RRA
- Throws:
java.lang.IllegalArgumentException
- the illegal argument exception
-
formatMergeable
public boolean formatMergeable(AbstractRRA sourceRra)
Description copied from class:AbstractRRA
Format mergeable.Two RRA can be merged if and only if the Consolidation Function and the PDP per row are the same.
The amount of rows is not strict for a merge operation.
- If the sourceRra has more rows than the current RRA, the result will be truncated by the number of rows on the current RRA.
- If the sourceRra has less rows than the current RRA, the result will have a NaN window as big as the different between the number of rows.
- Specified by:
formatMergeable
in classAbstractRRA
- Parameters:
sourceRra
- the source RRA object- Returns:
- true, if the format is mergeable
-
hasAverageAsCF
public boolean hasAverageAsCF()
Description copied from class:AbstractRRA
Checks for average as consolidation function.- Specified by:
hasAverageAsCF
in classAbstractRRA
- Returns:
- true, if the consolidation function is AVERAGE
-
-