public class Header extends Object implements RrdUpdater<Header>
Normally, you don't need to manipulate the Header object directly - Rrd4j framework does it for you.
Modifier and Type | Field and Description |
---|---|
(package private) static String |
DEFAULT_SIGNATURE |
(package private) static String |
RRDTOOL_VERSION1 |
(package private) static String |
RRDTOOL_VERSION3 |
(package private) static String |
SIGNATURE |
(package private) static int |
SIGNATURE_LENGTH |
Constructor and Description |
---|
Header(RrdDb parentDb,
DataImporter reader) |
Header(RrdDb parentDb,
RrdDef rrdDef) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
appendXml(XmlWriter writer) |
void |
copyStateTo(Header header)
copyStateTo.
|
(package private) String |
dump() |
int |
getArcCount()
Returns the number of archives defined in the RRD.
|
int |
getDsCount()
Returns the number of datasources defined in the RRD.
|
String |
getInfo()
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.
|
(package private) boolean |
isRrd4jHeader() |
void |
setInfo(String info)
setInfo.
|
(package private) void |
setLastUpdateTime(long lastUpdateTime) |
(package private) void |
validateHeader() |
static final int SIGNATURE_LENGTH
static final String SIGNATURE
static final String DEFAULT_SIGNATURE
static final String RRDTOOL_VERSION1
static final String RRDTOOL_VERSION3
Header(RrdDb parentDb, RrdDef rrdDef) throws IOException
IOException
Header(RrdDb parentDb, DataImporter reader) throws IOException
IOException
public String getSignature() throws IOException
IOException
- Thrown in case of I/O errorpublic String getInfo() throws IOException
getInfo.
String
object.IOException
- if any.public void setInfo(String info) throws IOException
setInfo.
info
- a String
object.IOException
- if any.public long getLastUpdateTime() throws IOException
IOException
- Thrown in case of I/O errorpublic long getStep() throws IOException
IOException
- Thrown in case of I/O errorpublic int getDsCount() throws IOException
IOException
- Thrown in case of I/O errorpublic int getArcCount() throws IOException
IOException
- Thrown in case of I/O errorvoid setLastUpdateTime(long lastUpdateTime) throws IOException
IOException
String dump() throws IOException
IOException
void appendXml(XmlWriter writer) throws IOException
IOException
public void copyStateTo(Header header) throws IOException
copyStateTo.
Copies object's internal state to another Header object.copyStateTo
in interface RrdUpdater<Header>
header
- a RrdUpdater
object.IOException
- if any.public RrdBackend getRrdBackend()
getRrdBackend
in interface RrdUpdater<Header>
public int getVersion() throws IOException
IOException
- if any.boolean isRrd4jHeader()
void validateHeader() throws IOException
IOException
public RrdAllocator getRrdAllocator()
getRrdAllocator
in interface RrdUpdater<Header>