|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opennms.netmgt.rrd.jrobin.JRobinRrdStrategy
public class 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)
| Constructor Summary | |
|---|---|
JRobinRrdStrategy()
|
|
| Method Summary | |
|---|---|
void |
closeFile(Object rrdFile)
Closes the JRobin RrdDb. |
Object |
createDefinition(String creator,
String directory,
String rrdName,
int step,
List<RrdDataSource> dataSources,
List<String> rraList)
|
void |
createFile(Object rrdDef)
Creates the JRobin RrdDb from the def by opening the file and then closing. |
InputStream |
createGraph(String command,
File workDir)
|
protected org.jrobin.graph.RrdGraphDef |
createGraphDef(File workDir,
String[] commandArray)
|
RrdGraphDetails |
createGraphReturnDetails(String command,
File workDir)
This constructs a graphDef by parsing the rrdtool style command and using the values to create the JRobin graphDef. |
static char[] |
escapeIfNotPathSepInDEF(char encountered,
char escaped,
StringBuffer currToken)
|
Double |
fetchLastValue(String fileName,
String ds,
int interval)
Fetch the last value from the JRobin RrdDb file. |
Double |
fetchLastValue(String fileName,
String ds,
String consolidationFunction,
int interval)
|
Double |
fetchLastValueInRange(String fileName,
String ds,
int interval,
int range)
|
String |
getDefaultFileExtension()
|
int |
getGraphLeftOffset()
|
int |
getGraphRightOffset()
|
int |
getGraphTopOffsetWithText()
|
String |
getStats()
This implementation does not track any stats. |
void |
graphicsInitialize()
|
void |
initialize()
Initialized the RrdDb to use the FILE factory because the NIO factory uses too much memory for our implementation. |
Object |
openFile(String fileName)
Opens the JRobin RrdDb by name and returns it. |
void |
promoteEnqueuedFiles(Collection<String> rrdFiles)
|
static String[] |
tokenizeWithQuotingAndEscapes(String line,
String delims,
boolean processQuoted)
|
static String[] |
tokenizeWithQuotingAndEscapes(String line,
String delims,
boolean processQuoted,
String tokens)
Tokenize a String into an array of Strings. |
void |
updateFile(Object rrdFile,
String owner,
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 |
| Constructor Detail |
|---|
public JRobinRrdStrategy()
| Method Detail |
|---|
public void closeFile(Object rrdFile)
throws Exception
closeFile in interface RrdStrategyException
public Object createDefinition(String creator,
String directory,
String rrdName,
int step,
List<RrdDataSource> dataSources,
List<String> rraList)
throws Exception
createDefinition in interface RrdStrategyException
public void createFile(Object rrdDef)
throws Exception
createFile in interface RrdStrategyException
public Object openFile(String fileName)
throws Exception
openFile in interface RrdStrategyException
public void updateFile(Object rrdFile,
String owner,
String data)
throws Exception
updateFile in interface RrdStrategyException
public void initialize()
throws Exception
initialize in interface RrdStrategyException
public void graphicsInitialize()
throws Exception
graphicsInitialize in interface RrdStrategyException
public Double fetchLastValue(String fileName,
String ds,
int interval)
throws NumberFormatException,
RrdException
fetchLastValue in interface RrdStrategyNumberFormatException
RrdException
public Double fetchLastValue(String fileName,
String ds,
String consolidationFunction,
int interval)
throws RrdException
fetchLastValue in interface RrdStrategyRrdException
public Double fetchLastValueInRange(String fileName,
String ds,
int interval,
int range)
throws NumberFormatException,
RrdException
fetchLastValueInRange in interface RrdStrategyNumberFormatException
RrdException
public InputStream createGraph(String command,
File workDir)
throws IOException,
RrdException
createGraph in interface RrdStrategyIOException
RrdException
public RrdGraphDetails createGraphReturnDetails(String command,
File workDir)
throws IOException,
RrdException
createGraphReturnDetails in interface RrdStrategyIOException
RrdExceptionpublic void promoteEnqueuedFiles(Collection<String> rrdFiles)
promoteEnqueuedFiles in interface RrdStrategy
protected org.jrobin.graph.RrdGraphDef createGraphDef(File workDir,
String[] commandArray)
throws org.jrobin.core.RrdException
org.jrobin.core.RrdExceptionpublic String getStats()
getStats in interface RrdStrategypublic int getGraphLeftOffset()
getGraphLeftOffset in interface RrdStrategypublic int getGraphRightOffset()
getGraphRightOffset in interface RrdStrategypublic int getGraphTopOffsetWithText()
getGraphTopOffsetWithText in interface RrdStrategypublic String getDefaultFileExtension()
getDefaultFileExtension in interface RrdStrategy
public static String[] tokenizeWithQuotingAndEscapes(String line,
String delims,
boolean processQuoted)
public static String[] tokenizeWithQuotingAndEscapes(String line,
String delims,
boolean processQuoted,
String tokens)
String into an array of Strings.
line - the string to tokenizedelims - a string containing zero or more characters to treat as a delimiterprocessQuoted - whether or not to process escaped values inside quotestokens - custom escaped tokens to pass through, escaped. For example, if tokens contains "lsg", then \l, \s, and \g
will be passed through unescaped.
public static char[] escapeIfNotPathSepInDEF(char encountered,
char escaped,
StringBuffer currToken)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||