public class

Header

extends Object
java.lang.Object
   ↳ org.rrd4j.core.Header

Class Overview

Class to represent RRD header. Header information is mainly static (once set, it cannot be changed), with the exception of last update time (this value is changed whenever RRD gets updated).

Normally, you don't need to manipulate the Header object directly - Rrd4j framework does it for you.

Summary

Public Methods
void copyStateTo(RrdUpdater other)
Copies object's internal state to another Header object.
int getArcCount()
Returns the number of archives defined in the RRD.
int getDsCount()
Returns the number of datasources defined in the RRD.
String getInfo()
long getLastUpdateTime()
Returns the last update time of the RRD.
RrdAllocator getRrdAllocator()
Required to implement RrdUpdater interface.
RrdBackend getRrdBackend()
Returns the underlying storage (backend) object which actually performs all I/O operations.
String getSignature()
Returns RRD signature.
long getStep()
Returns primary RRD time step.
int getVersion()
Return the RRD version.
void setInfo(String info)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void copyStateTo (RrdUpdater other)

Copies object's internal state to another Header object.

Parameters
other New Header object to copy state to
Throws
IOException Thrown in case of I/O error

public int getArcCount ()

Returns the number of archives defined in the RRD.

Returns
  • Number of archives defined
Throws
IOException Thrown in case of I/O error

public int getDsCount ()

Returns the number of datasources defined in the RRD.

Returns
  • Number of datasources defined
Throws
IOException Thrown in case of I/O error

public String getInfo ()

Throws
IOException

public long getLastUpdateTime ()

Returns the last update time of the RRD.

Returns
  • Timestamp (Unix epoch, no milliseconds) corresponding to the last update time.
Throws
IOException Thrown in case of I/O error

public RrdAllocator getRrdAllocator ()

Required to implement RrdUpdater interface. You should never call this method directly.

Returns
  • Allocator object

public RrdBackend getRrdBackend ()

Returns the underlying storage (backend) object which actually performs all I/O operations.

Returns
  • I/O backend object

public String getSignature ()

Returns RRD signature. Initially, the returned string will be of the form Rrd4j, version x.x.

Returns
  • RRD signature
Throws
IOException Thrown in case of I/O error

public long getStep ()

Returns primary RRD time step.

Returns
  • Primary time step in seconds
Throws
IOException Thrown in case of I/O error

public int getVersion ()

Return the RRD version.

Returns
  • RRD version
Throws
IOException

public void setInfo (String info)

Throws
IOException