public class NullRrdStrategy extends Object implements RrdStrategy<Object,Object>
| Constructor and Description |
|---|
NullRrdStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeFile(Object rrd)
This closes the supplied round robin database
|
Object |
createDefinition(String creator,
String directory,
String rrdName,
int step,
List<RrdDataSource> dataSources,
List<String> rraList)
Create a round robin database definition from the supplied parameters.
|
void |
createFile(Object rrdDef,
Map<String,String> attrMapping)
Creates the round robin database defined by the supplied definition.
|
InputStream |
createGraph(String command,
File workDir)
Creates an InputStream representing the bytes of a graph created from
round robin data.
|
RrdGraphDetails |
createGraphReturnDetails(String command,
File workDir)
Creates an RrdGraphDetails object representing the graph created from
round robin data.
|
Double |
fetchLastValue(String rrdFile,
String ds,
int interval)
Fetches the last value from the round robin database with the given name.
|
Double |
fetchLastValue(String rrdFile,
String ds,
String consolidationFunction,
int interval)
Fetches the last value from the round robin database with the given name.
|
Double |
fetchLastValueInRange(String rrdFile,
String ds,
int interval,
int range)
Fetches the last value from the round robin database with the given name
within a time range.
|
String |
getDefaultFileExtension()
Get the file extension appropriate for files of this type
|
int |
getGraphLeftOffset()
Returns the number of pixels that the leftt-hand side of the graph is
offset from the left side of the created image.
|
int |
getGraphRightOffset()
Returns the number of pixels that the right-hand side of the graph is
offset from the right side of the created image.
|
int |
getGraphTopOffsetWithText()
Returns the number of pixels that the top of the graph is offset from
the top of the created image if there is single line of header text.
|
String |
getStats()
Provides the round robin database an opportunity to contribute statistics
information to the logs file.
|
void |
graphicsInitialize() |
void |
initialize() |
Object |
openFile(String fileName)
Opens the round robin database with the supplied name.
|
void |
promoteEnqueuedFiles(Collection<String> rrdFiles)
In the event that this is a queuing implementation of the RrdStrategy.
|
void |
setConfigurationProperties(Properties configurationParameters)
setConfigurationProperties
|
void |
updateFile(Object rrd,
String owner,
String data)
Updates the supplied round robin database with the given timestamp:value
point
|
public void setConfigurationProperties(Properties configurationParameters)
RrdStrategysetConfigurationProperties
setConfigurationProperties in interface RrdStrategy<Object,Object>configurationParameters - a Properties object.public void closeFile(Object rrd) throws Exception
RrdStrategycloseFile in interface RrdStrategy<Object,Object>rrd - an rrd object created using openFileException - if an error occurs closing the filepublic Object createDefinition(String creator, String directory, String rrdName, int step, List<RrdDataSource> dataSources, List<String> rraList) throws Exception
RrdStrategycreateDefinition in interface RrdStrategy<Object,Object>creator - - A string representing who is creating this file for use in
log msgsdirectory - - The directory to create the file inrrdName - - The name to use for the round robin databasestep - - the step for the databasedataSources - - the data sources to use for round robin databaserraList - - a List of the round robin archives to create in the
database. defines after which time the data is condensed to a
defined lower stepException - If an error occurs while creating the definitionpublic void createFile(Object rrdDef, Map<String,String> attrMapping) throws Exception
RrdStrategycreateFile in interface RrdStrategy<Object,Object>rrdDef - an round robin database definition created using the
createDefinition call.attrMapping - a Map that represents the mapping of
attributeId to rrd track names. default there is only one
track per datasource, but it is possible to store multiple
tracks in one datasourceException - if an error occurs create the filepublic InputStream createGraph(String command, File workDir) throws IOException, RrdException
RrdStrategycreateGraph in interface RrdStrategy<Object,Object>command - the command needed to create the graphworkDir - the directory that all referenced files are relative toIOException - if an IOError occursRrdException - if an RRD error occurspublic RrdGraphDetails createGraphReturnDetails(String command, File workDir) throws IOException, RrdException
RrdStrategycreateGraphReturnDetails in interface RrdStrategy<Object,Object>command - the command needed to create the graphworkDir - the directory that all referenced files are relative toIOException - if an IOError occursRrdException - if an RRD error occurspublic Double fetchLastValue(String rrdFile, String ds, int interval) throws NumberFormatException, RrdException
RrdStrategyfetchLastValue in interface RrdStrategy<Object,Object>rrdFile - a name the represents a round robin databaseds - a name the represents a data source to be usedinterval - a step interval of the round robin databaseNumberFormatException - if any.RrdException - if any.public Double fetchLastValueInRange(String rrdFile, String ds, int interval, int range) throws NumberFormatException, RrdException
RrdStrategyfetchLastValueInRange in interface RrdStrategy<Object,Object>rrdFile - a name the represents a round robin databaseds - a name the represents a data source to be usedinterval - a step interval of the round robin databaserange - an acceptable range for which the last value will be returnedNumberFormatException - if any.RrdException - if any.public String getStats()
RrdStrategygetStats in interface RrdStrategy<Object,Object>public Object openFile(String fileName) throws Exception
RrdStrategyopenFile in interface RrdStrategy<Object,Object>fileName - the name of the associated rrd fileException - if an error occurs opening the filepublic void updateFile(Object rrd, String owner, String data) throws Exception
RrdStrategyupdateFile in interface RrdStrategy<Object,Object>rrd - an rrd object created using openFileowner - the owner of the rrddata - a string of the form Exception - if an error occurs updating the filepublic int getGraphLeftOffset()
RrdStrategygetGraphLeftOffset in interface RrdStrategy<Object,Object>public int getGraphRightOffset()
RrdStrategygetGraphRightOffset in interface RrdStrategy<Object,Object>public int getGraphTopOffsetWithText()
RrdStrategygetGraphTopOffsetWithText in interface RrdStrategy<Object,Object>public String getDefaultFileExtension()
RrdStrategygetDefaultFileExtension in interface RrdStrategy<Object,Object>String object.public Double fetchLastValue(String rrdFile, String ds, String consolidationFunction, int interval) throws NumberFormatException, RrdException
RrdStrategyfetchLastValue in interface RrdStrategy<Object,Object>rrdFile - a name the represents a round robin databaseds - a name the represents a data source to be usedconsolidationFunction - a String object.interval - a step interval of the round robin databaseNumberFormatException - if any.RrdException - if any.public void promoteEnqueuedFiles(Collection<String> rrdFiles)
RrdStrategypromoteEnqueuedFiles in interface RrdStrategy<Object,Object>rrdFiles - a Collection object.Copyright © 2015. All rights reserved.