public class ArcState extends Object implements RrdUpdater<ArcState>
| Constructor and Description |
|---|
ArcState(Archive parentArc,
boolean shouldInitialize)Owning archive. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void | appendXml(XmlWriter writer)Append XML representation. |
void | copyStateTo(ArcState arcState)copyStateTo. |
(package private) String | dump()Dump state as a string. |
double | getAccumValue()Returns the value accumulated so far. |
long | getNanSteps()Returns the number of currently accumulated NaN steps. |
Archive | getParent()Returns the Archive object to which this ArcState object belongs. |
RrdAllocator | getRrdAllocator()Required to implement RrdUpdater interface. |
RrdBackend | getRrdBackend()Returns the underlying storage (backend) object which actually performs all I/O operations. |
(package private) void | setAccumValue(double value)Set the accumulated value. |
(package private) void | setNanSteps(long value)Set the NaN steps count. |
ArcState(Archive parentArc, boolean shouldInitialize) throws IOException
parentArc - the owning archiveshouldInitialize - whether to initialize accumulator and NaN stepsIOException - if an I/O error occursvoid appendXml(XmlWriter writer) throws IOException
writer - the XML writerIOException - if an I/O error occurspublic void copyStateTo(ArcState arcState) throws IOException
Copies object's internal state to another ArcState object.
copyStateTo in interface RrdUpdater<ArcState>arcState - a RrdUpdater object.IOException - if any.String dump() throws IOException
IOException - if an I/O error occurspublic double getAccumValue()
throws IOExceptionIOException - Thrown in case of I/O errorpublic long getNanSteps()
throws IOExceptionIOException - Thrown in case of I/O errorpublic Archive getParent()
public RrdAllocator getRrdAllocator()
getRrdAllocator in interface RrdUpdater<ArcState>public RrdBackend getRrdBackend()
getRrdBackend in interface RrdUpdater<ArcState>void setAccumValue(double value)
throws IOExceptionvalue - the value to setIOException - if an I/O error occursvoid setNanSteps(long value)
throws IOExceptionvalue - the value to setIOException - if an I/O error occurs