ConsolFuns
, RrdUpdater
public class Archive extends java.lang.Object implements RrdUpdater, ConsolFuns
Each archive object consists of three parts: archive definition, archive state objects (one state object for each datasource) and round robin archives (one round robin for each datasource). API (read-only) is provided to access each of theese parts.
CF_AVERAGE, CF_FIRST, CF_LAST, CF_MAX, CF_MIN, CF_TOTAL
コンストラクタ | 説明 |
---|---|
Archive(RrdDb parentDb,
ArcDef arcDef) |
|
Archive(RrdDb parentDb,
DataImporter reader,
int arcIndex) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
(package private) void |
appendXml(XmlWriter writer) |
|
void |
archive(int dsIndex,
double value,
long numStepUpdates) |
|
void |
copyStateTo(RrdUpdater other) |
Copies object's internal state to another Archive object.
|
(package private) java.lang.String |
dump() |
|
(package private) FetchData |
fetchData(FetchRequest request) |
|
ArcState |
getArcState(int dsIndex) |
Returns the underlying archive state object.
|
long |
getArcStep() |
Returns archive time step in seconds.
|
java.lang.String |
getConsolFun() |
Returns archive consolidation function ("AVERAGE", "MIN", "MAX" or "LAST").
|
long |
getEndTime() |
Returns current ending timestamp.
|
(package private) RrdDb |
getParentDb() |
|
Robin |
getRobin(int dsIndex) |
Returns the underlying round robin archive.
|
int |
getRows() |
Returns the number of archive rows.
|
RrdAllocator |
getRrdAllocator() |
Required to implement RrdUpdater interface.
|
RrdBackend |
getRrdBackend() |
Returns the underlying storage (backend) object which actually performs all
I/O operations.
|
long |
getStartTime() |
Returns current starting timestamp.
|
int |
getSteps() |
Returns the number of archive steps.
|
double |
getXff() |
Returns archive X-files factor.
|
void |
setXff(double xff) |
Sets X-files factor to a new value.
|
java.lang.String |
toString() |
Archive(RrdDb parentDb, DataImporter reader, int arcIndex) throws java.io.IOException, RrdException, RrdException
java.io.IOException
RrdException
public long getArcStep() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O error.java.lang.String dump() throws java.io.IOException
java.io.IOException
RrdDb getParentDb()
public void archive(int dsIndex, double value, long numStepUpdates) throws java.io.IOException
java.io.IOException
public java.lang.String getConsolFun() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O error.public double getXff() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O error.public int getSteps() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O error.public int getRows() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O error.public long getStartTime() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O error.public long getEndTime() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O error.public ArcState getArcState(int dsIndex)
dsIndex
- Datasource indexpublic Robin getRobin(int dsIndex)
dsIndex
- Index of the datasource in the RRD.FetchData fetchData(FetchRequest request) throws java.io.IOException, RrdException
java.io.IOException
RrdException
void appendXml(XmlWriter writer) throws java.io.IOException
java.io.IOException
public void copyStateTo(RrdUpdater other) throws java.io.IOException, RrdException
copyStateTo
インタフェース内 RrdUpdater
other
- New Archive object to copy state tojava.io.IOException
- Thrown in case of I/O errorRrdException
- Thrown if supplied argument is not an Archive objectpublic void setXff(double xff) throws RrdException, java.io.IOException
xff
- New X-files factor value. Must be >= 0 and < 1.RrdException
- Thrown if invalid value is suppliedjava.io.IOException
- Thrown in case of I/O errorpublic RrdBackend getRrdBackend()
getRrdBackend
インタフェース内 RrdUpdater
public RrdAllocator getRrdAllocator()
getRrdAllocator
インタフェース内 RrdUpdater
public java.lang.String toString()
toString
クラス内 java.lang.Object