Package org.opennms.netmgt.rrd.model
Class RrdConvertUtils
- java.lang.Object
-
- org.opennms.netmgt.rrd.model.RrdConvertUtils
-
public class RrdConvertUtils extends Object
The Class RRD Conversion Utilities.- Author:
- Alejandro Galue
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static RRDv3
convert(RRDv1 jrb)
Converts a JRobin object into an RRDtool object.protected static RRDv1
convert(RRDv3 rrd)
Converts a RRDtool object into a JRobin object.static void
convertFromJrobinToRrd(File sourceJrobinFile, File targetRrdFile)
Convert from JRobin to RRDtool.static void
convertFromRrdToJrobin(File sourceRrdFile, File targetJrobinFile)
Convert from RRDtool to JRobin.static RRDv1
dumpJrb(File sourceFile)
Dumps a JRB.static RRDv3
dumpRrd(File sourceFile)
Dumps a RRD.static void
restoreJrb(RRDv1 rrd, File targetFile)
Restore a JRB.static void
restoreRrd(RRDv3 rrd, File targetFile)
Restores a RRD.
-
-
-
Method Detail
-
dumpJrb
public static RRDv1 dumpJrb(File sourceFile) throws IOException, org.jrobin.core.RrdException
Dumps a JRB.- Parameters:
sourceFile
- the source file- Returns:
- the RRD Object (old version)
- Throws:
IOException
- Signals that an I/O exception has occurred.org.jrobin.core.RrdException
- the RRD exception
-
dumpRrd
public static RRDv3 dumpRrd(File sourceFile) throws IOException, org.jrobin.core.RrdException
Dumps a RRD.- Parameters:
sourceFile
- the source file- Returns:
- the RRD Object
- Throws:
IOException
- Signals that an I/O exception has occurred.org.jrobin.core.RrdException
- the RRD exception
-
restoreJrb
public static void restoreJrb(RRDv1 rrd, File targetFile) throws IOException, org.jrobin.core.RrdException
Restore a JRB.- Parameters:
rrd
- the RRD object (old version)targetFile
- the target file- Throws:
IOException
- Signals that an I/O exception has occurred.org.jrobin.core.RrdException
- the RRD exception
-
restoreRrd
public static void restoreRrd(RRDv3 rrd, File targetFile) throws IOException, org.jrobin.core.RrdException
Restores a RRD.- Parameters:
rrd
- the RRD objecttargetFile
- the target file- Throws:
IOException
- Signals that an I/O exception has occurred.org.jrobin.core.RrdException
- the RRD exception
-
convertFromRrdToJrobin
public static void convertFromRrdToJrobin(File sourceRrdFile, File targetJrobinFile) throws IOException, org.jrobin.core.RrdException
Convert from RRDtool to JRobin.- Parameters:
sourceRrdFile
- the source RRDtool filetargetJrobinFile
- the target JRobin file- Throws:
IOException
- Signals that an I/O exception has occurred.org.jrobin.core.RrdException
- the RRD exception
-
convertFromJrobinToRrd
public static void convertFromJrobinToRrd(File sourceJrobinFile, File targetRrdFile) throws IOException, org.jrobin.core.RrdException
Convert from JRobin to RRDtool.- Parameters:
sourceJrobinFile
- the source JRobin filetargetRrdFile
- the target RRDtool file- Throws:
IOException
- Signals that an I/O exception has occurred.org.jrobin.core.RrdException
- the RRD exception
-
convert
protected static RRDv3 convert(RRDv1 jrb) throws IllegalArgumentException
Converts a JRobin object into an RRDtool object.- Parameters:
jrb
- the source JRobin object representation- Returns:
- the RRDtool object representation
- Throws:
IllegalArgumentException
- the illegal argument exception (when the conversion is not possible)
-
convert
protected static RRDv1 convert(RRDv3 rrd) throws IllegalArgumentException
Converts a RRDtool object into a JRobin object.- Parameters:
rrd
- the RRDtool object representation- Returns:
- the JRobin object representation
- Throws:
IllegalArgumentException
- the illegal argument exception (when the conversion is not possible)
-
-