|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface RrdStrategy
Defines an abstract strategy for manipulating round robin database file. This is used by the RrdUtils to implement the appropriate behavior
| Method Summary | |
|---|---|
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)
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()
This Initializes the graphics subsystem only. |
void |
initialize()
Initialize the appropriate round robin system |
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 |
updateFile(Object rrd,
String owner,
String data)
Updates the supplied round robin database with the given timestamp:value point |
| Method Detail |
|---|
void initialize()
throws Exception
Exception - if an Error occurs
void graphicsInitialize()
throws Exception
ExceptionString getDefaultFileExtension()
Object createDefinition(String creator,
String directory,
String rrdName,
int step,
List<RrdDataSource> dataSources,
List<String> rraList)
throws Exception
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
Exception - If an error occurs while creating the definition
void createFile(Object rrdDef)
throws Exception
rrdDef - an round robin database definition created using the
createDefinition call.
Exception - if an error occurs create the file
Object openFile(String fileName)
throws Exception
fileName - the name of the associated rrd file
Exception - if an error occurs opening the file
void updateFile(Object rrd,
String owner,
String data)
throws Exception
rrd - an rrd object created using openFileowner - the owner of the rrddata - a string of the form Exception - if an error occurs updating the file
void closeFile(Object rrd)
throws Exception
rrd - an rrd object created using openFile
Exception - if an error occurs closing the file
Double fetchLastValue(String rrdFile,
String ds,
int interval)
throws NumberFormatException,
RrdException
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 database
NumberFormatException
RrdException
Double fetchLastValue(String rrdFile,
String ds,
String consolidationFunction,
int interval)
throws NumberFormatException,
RrdException
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 database
NumberFormatException
RrdException
Double fetchLastValueInRange(String rrdFile,
String ds,
int interval,
int range)
throws NumberFormatException,
RrdException
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 returned
NumberFormatException
RrdException
InputStream createGraph(String command,
File workDir)
throws IOException,
RrdException
command - the command needed to create the graphworkDir - the directory that all referenced files are relative to
IOException - if an IOError occurs
RrdException - if an RRD error occurs
RrdGraphDetails createGraphReturnDetails(String command,
File workDir)
throws IOException,
RrdException
command - the command needed to create the graphworkDir - the directory that all referenced files are relative to
IOException - if an IOError occurs
RrdException - if an RRD error occursint getGraphLeftOffset()
int getGraphRightOffset()
int getGraphTopOffsetWithText()
String getStats()
void promoteEnqueuedFiles(Collection<String> rrdFiles)
files - collection of files whose data should be written
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||