Package org.jrobin.core
Class ArcState
- java.lang.Object
-
- org.jrobin.core.ArcState
-
- All Implemented Interfaces:
RrdUpdater
public class ArcState extends Object implements RrdUpdater
Class to represent internal RRD archive state for a single datasource. Objects of this class are never manipulated directly, it's up to JRobin framework to manage internal arcihve states.- Author:
- Sasa Markovic
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidappendXml(XmlWriter writer)voidcopyStateTo(RrdUpdater other)Copies object's internal state to another ArcState object.(package private) Stringdump()doublegetAccumValue()Returns the value accumulated so far.longgetNanSteps()Returns the number of currently accumulated NaN steps.ArchivegetParent()Returns the Archive object to which this ArcState object belongs.RrdAllocatorgetRrdAllocator()Required to implement RrdUpdater interface.RrdBackendgetRrdBackend()Returns the underlying storage (backend) object which actually performs all I/O operations.(package private) voidsetAccumValue(double value)(package private) voidsetNanSteps(long value)StringtoString()
-
-
-
Constructor Detail
-
ArcState
ArcState(Archive parentArc, boolean shouldInitialize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
dump
String dump() throws IOException
- Throws:
IOException
-
setNanSteps
void setNanSteps(long value) throws IOException- Throws:
IOException
-
getNanSteps
public long getNanSteps() throws IOExceptionReturns the number of currently accumulated NaN steps.- Returns:
- Number of currently accumulated NaN steps.
- Throws:
IOException- Thrown in case of I/O error
-
setAccumValue
void setAccumValue(double value) throws IOException- Throws:
IOException
-
getAccumValue
public double getAccumValue() throws IOExceptionReturns the value accumulated so far.- Returns:
- Accumulated value
- Throws:
IOException- Thrown in case of I/O error
-
getParent
public Archive getParent()
Returns the Archive object to which this ArcState object belongs.- Returns:
- Parent Archive object.
-
appendXml
void appendXml(XmlWriter writer) throws IOException
- Throws:
IOException
-
copyStateTo
public void copyStateTo(RrdUpdater other) throws IOException, RrdException
Copies object's internal state to another ArcState object.- Specified by:
copyStateToin interfaceRrdUpdater- Parameters:
other- New ArcState object to copy state to- Throws:
IOException- Thrown in case of I/O errorRrdException- Thrown if supplied argument is not an ArcState object
-
getRrdBackend
public RrdBackend getRrdBackend()
Returns the underlying storage (backend) object which actually performs all I/O operations.- Specified by:
getRrdBackendin interfaceRrdUpdater- Returns:
- I/O backend object
-
getRrdAllocator
public RrdAllocator getRrdAllocator()
Required to implement RrdUpdater interface. You should never call this method directly.- Specified by:
getRrdAllocatorin interfaceRrdUpdater- Returns:
- Allocator object
-
-