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