|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.rrd.JRobinRrdStrategy
Provides a JRobin based implementation of RrdStrategy. It uses JRobin 1.4 in FILE mode (NIO is too memory consuming for the large number of files that we open)
| Field Summary | |
private boolean |
m_initialized
|
| Constructor Summary | |
JRobinRrdStrategy()
|
|
| Method Summary | |
void |
closeFile(java.lang.Object rrdFile)
Closes the JRobin RrdDb. |
java.lang.Object |
createDefinition(java.lang.String creator,
java.lang.String directory,
java.lang.String dsName,
int step,
java.lang.String dsType,
int dsHeartbeat,
java.lang.String dsMin,
java.lang.String dsMax,
java.util.List rraList)
Creates and returns a RrdDef represented by the parameters. |
void |
createFile(java.lang.Object rrdDef)
Creates the JRobin RrdDb from the def by opening the file and then closing. |
java.io.InputStream |
createGraph(java.lang.String command,
java.io.File workDir)
This constructs a graphDef by parsing the rrdtool style command and using the values to create the JRobin graphDef. |
java.lang.Double |
fetchLastValue(java.lang.String fileName,
int interval)
Fetch the last value from the JRobin RrdDb file. |
private java.awt.Color |
getColor(java.lang.String colorValue)
|
java.lang.String |
getStats()
This implementation does not track and stats. |
void |
graphicsInitialize()
This Initializes the graphics subsystem only. |
void |
initialize()
Initialized the RrdDb to use the FILE factory because the NIO factory uses too much memory for our implementation. |
java.lang.Object |
openFile(java.lang.String fileName)
Opens the JRobin RrdDb by name and returns it. |
private java.lang.String[] |
tokenize(java.lang.String line,
java.lang.String delims,
boolean processQuoted)
|
void |
updateFile(java.lang.Object rrdFile,
java.lang.String data)
Creates a sample from the JRobin RrdDb and passes in the data provided. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private boolean m_initialized
| Constructor Detail |
public JRobinRrdStrategy()
| Method Detail |
public void closeFile(java.lang.Object rrdFile)
throws java.lang.Exception
closeFile in interface RrdStrategyrrdFile - an rrd object created using openFile
java.lang.Exception - if an error occurs closing the file
public java.lang.Object createDefinition(java.lang.String creator,
java.lang.String directory,
java.lang.String dsName,
int step,
java.lang.String dsType,
int dsHeartbeat,
java.lang.String dsMin,
java.lang.String dsMax,
java.util.List rraList)
throws java.lang.Exception
createDefinition in interface RrdStrategycreator - - A string representing who is creating this file for use in log msgsdirectory - - The directory to create the file indsName - - The datasource name for use in the round robin databasestep - - the step for the databasedsType - - the type for the datasourcedsHeartbeat - - the heartbeat for the datasoucedsMin - - the minimum allowable value for the datasourcedsMax - - the maximum allowable value for the datasoucerraList - - a List of the round robin archives to create in the database
java.lang.Exception - If an error occurs while creating the definition
public void createFile(java.lang.Object rrdDef)
throws java.lang.Exception
createFile in interface RrdStrategyrrdDef - an round robin database definition created using the createDefinition call.
java.lang.Exception - if an error occurs create the file
public java.lang.Object openFile(java.lang.String fileName)
throws java.lang.Exception
openFile in interface RrdStrategyfileName - the name of the associated rrd file
java.lang.Exception - if an error occurs opening the file
public void updateFile(java.lang.Object rrdFile,
java.lang.String data)
throws java.lang.Exception
updateFile in interface RrdStrategyrrdFile - an rrd object created using openFiledata - a string of the form java.lang.Exception - if an error occurs updating the file
public void initialize()
throws java.lang.Exception
initialize in interface RrdStrategyjava.lang.Exception - if an Error occurs
public void graphicsInitialize()
throws java.lang.Exception
RrdStrategy
graphicsInitialize in interface RrdStrategyjava.lang.Exception
public java.lang.Double fetchLastValue(java.lang.String fileName,
int interval)
throws java.lang.NumberFormatException,
RrdException
fetchLastValue in interface RrdStrategyfileName - a name the represents a round robin databaseinterval - a step interval of the round robin database
java.lang.NumberFormatException
RrdExceptionprivate java.awt.Color getColor(java.lang.String colorValue)
private java.lang.String[] tokenize(java.lang.String line,
java.lang.String delims,
boolean processQuoted)
public java.io.InputStream createGraph(java.lang.String command,
java.io.File workDir)
throws java.io.IOException,
RrdException
createGraph in interface RrdStrategycommand - the command needed to create the graphworkDir - the directory that all referenced files are relative to
RrdException - if an RRD error occurs
java.io.IOException - if an IOError occurspublic java.lang.String getStats()
getStats in interface RrdStrategy
|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||