- All Known Implementing Classes:
DataProcessor, RrdGraphDef
public interface DataHolder
Interface for holding data sources.
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanConstant that defines the defaultRrdDbPoolusage policy.Method Summary
All MethodsModifier and TypeMethodDescriptionvoiddatasource(String name, String rpnExpression) Create a new virtual datasource by evaluating a mathematical expression, specified in Reverse Polish Notation (RPN).voiddatasource(String name, String rrdPath, String dsName, ConsolFun consolFun) Defines virtual datasource.voiddatasource(String name, String rrdPath, String dsName, ConsolFun consolFun, RrdBackendFactory backend) Defines virtual datasource.voiddatasource(String name, String dsName, FetchData fetchData) Creates a new 'fetched' datasource.voiddatasource(String name, String defName, Variable var) Creates a datasource that performs a variable calculation on an another named datasource to yield a single combined timestamp/value.voiddatasource(String name, URI rrdUri, String dsName, ConsolFun consolFun) Defines virtual datasource.voiddatasource(String name, URI rrdUri, String dsName, ConsolFun consolFun, RrdBackendFactory backend) Defines virtual datasource.voiddatasource(String name, FetchData fetchData) Creates a new 'fetched' datasource.voiddatasource(String name, IPlottable plottable) Creates a new (plottable) datasource.longReturns ending timestamp.getPool()Returns the current pool.longReturns starting timestamp.longgetStep()Returns the time step used for timestamp interval.Returns the time zone.booleanReturns boolean value representingRrdDbPoolusage policy.voidsetEndTime(long time) Sets the time when the graph should end.voidDefines theRrdDbPoolto use.voidsetPoolUsed(boolean poolUsed) Sets theRrdDbPoolusage policy.voidsetStartTime(long time) Sets the time when the graph should start.voidsetStep(long step) Set the step for timestamp interval.voidsetTimeSpan(long startTime, long endTime) Sets starting and ending time for the for the graph.voidsetTimeZone(TimeZone tz) Set the time zone used for the legend.
Field Details
DEFAULT_POOL_USAGE_POLICY
static final boolean DEFAULT_POOL_USAGE_POLICYConstant that defines the defaultRrdDbPoolusage policy. Defaults tofalse(i.e. the pool will not be used to fetch data from RRD files)- See Also:
Method Details
isPoolUsed
boolean isPoolUsed()Returns boolean value representingRrdDbPoolusage policy.- Returns:
- true, if the pool will be used internally to fetch data from RRD files, false otherwise.
setPoolUsed
void setPoolUsed(boolean poolUsed) Sets theRrdDbPoolusage policy.- Parameters:
poolUsed- true, if the pool will be used to fetch data from RRD files, false otherwise.
getPool
setPool
Defines theRrdDbPoolto use. If not defined, but {setPoolUsed(boolean)set to true, the defaultRrdDbPool.getInstance()will be used.- Parameters:
pool- an optional pool to use.
setTimeZone
Set the time zone used for the legend.- Parameters:
tz- the time zone to set
getTimeZone
setEndTime
void setEndTime(long time) Sets the time when the graph should end. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time.- Parameters:
time- Ending time for the graph in seconds since epoch
getEndTime
long getEndTime()Returns ending timestamp.- Returns:
- Ending timestamp in seconds
setStartTime
void setStartTime(long time) Sets the time when the graph should start. Time in seconds since epoch (1970-01-01) is required. Negative numbers are relative to the current time.- Parameters:
time- Starting time for the graph in seconds since epoch
getStartTime
long getStartTime()Returns starting timestamp.- Returns:
- Starting timestamp in seconds
setTimeSpan
void setTimeSpan(long startTime, long endTime) Sets starting and ending time for the for the graph. Timestamps in seconds since epoch are required. Negative numbers are relative to the current time.- Parameters:
startTime- Starting time in seconds since epochendTime- Ending time in seconds since epoch
setStep
void setStep(long step) Set the step for timestamp interval.- Parameters:
step- time step for data processing
getStep
long getStep()Returns the time step used for timestamp interval.- Returns:
- Step used for data processing.
datasource
Defines virtual datasource. This datasource can then be used in other methods likedatasource(String, String).- Parameters:
name- Source namerrdPath- Path to RRD filedsName- Datasource name in the specified RRD fileconsolFun- Consolidation function (AVERAGE, MIN, MAX, LAST)
datasource
Defines virtual datasource. This datasource can then be used in other methods likedatasource(String, String).- Parameters:
name- Source namerrdUri- rrdUri to RRD filedsName- Datasource name in the specified RRD fileconsolFun- Consolidation function (AVERAGE, MIN, MAX, LAST)
datasource
void datasource(String name, String rrdPath, String dsName, ConsolFun consolFun, RrdBackendFactory backend) Defines virtual datasource. This datasource can then be used in other methods likedatasource(String, String).- Parameters:
name- Source namerrdPath- Path to RRD filedsName- Datasource name in the specified RRD fileconsolFun- Consolidation function (AVERAGE, MIN, MAX, LAST)backend- Backend to be used while fetching data from a RRD file.
datasource
void datasource(String name, URI rrdUri, String dsName, ConsolFun consolFun, RrdBackendFactory backend) Defines virtual datasource. This datasource can then be used in other methods likedatasource(String, String).- Parameters:
name- Source namerrdUri- URI to RRD filedsName- Datasource name in the specified RRD fileconsolFun- Consolidation function (AVERAGE, MIN, MAX, LAST)backend- Backend to be used while fetching data from a RRD file.
datasource
datasource
Creates a datasource that performs a variable calculation on an another named datasource to yield a single combined timestamp/value.Requires that the other datasource has already been defined; otherwise, it'll end up with no data
- Parameters:
name- - the new virtual datasource namedefName- - the datasource from which to extract the percentile. Must be a previously defined virtual datasourcevar- - a new instance of a Variable used to do the calculation
datasource
Creates a new (plottable) datasource. Datasource values are obtained from the given plottable object.- Parameters:
name- Source name.plottable- IPlottable object.
datasource
datasource
Creates a new 'fetched' datasource. Datasource values are obtained from the givenFetchDataobject. Values will be extracted from the datasource dsName in the fetchData- Parameters:
name- Source name.dsName- Source name in fetchData.fetchData- the fetched values for the source.