java.lang.Object
org.rrd4j.core.ArcState
- All Implemented Interfaces:
RrdUpdater<ArcState>
Class to represent internal RRD archive state for a single datasource. Objects of this class are never manipulated directly, it's up to Rrd4j to manage internal archive states.
Field Summary
Constructor Summary
Method Summary
Public MethodsModifier and TypeMethodDescription(package private) voidAppend XML representation.voidcopyStateTo(ArcState arcState) Copies object's internal state to another ArcState object.(package private) Stringdump()Dump state as a string.doubleReturns the value accumulated so far.longReturns the number of currently accumulated NaN steps.Returns the Archive object to which this ArcState object belongs.Required to implement RrdUpdater interface.Returns the underlying storage (backend) object which actually performs all I/O operations.(package private) voidsetAccumValue(double value) Set the accumulated value.(package private) voidsetNanSteps(long value) Set the NaN steps count.
Field Details
parentArc
The archive this state belongs to.accumValue
nanSteps
Constructor Details
ArcState
ArcState(Archive parentArc, boolean shouldInitialize) throws IOException Owning archive.- Parameters:
parentArc- the owning archiveshouldInitialize- whether to initialize accumulator and NaN steps- Throws:
IOException- if an I/O error occurs
Method Details
dump
Dump state as a string.- Returns:
- dump string
- Throws:
IOException- if an I/O error occurs
setNanSteps
Set the NaN steps count.- Parameters:
value- the value to set- Throws:
IOException- if an I/O error occurs
getNanSteps
Returns the number of currently accumulated NaN steps.- Returns:
- Number of currently accumulated NaN steps.
- Throws:
IOException- Thrown in case of I/O error
setAccumValue
Set the accumulated value.- Parameters:
value- the value to set- Throws:
IOException- if an I/O error occurs
getAccumValue
Returns the value accumulated so far.- Returns:
- Accumulated value
- Throws:
IOException- Thrown in case of I/O error
getParent
Returns the Archive object to which this ArcState object belongs.- Returns:
- Parent Archive object.
appendXml
Append XML representation.- Parameters:
writer- the XML writer- Throws:
IOException- if an I/O error occurs
copyStateTo
Copies object's internal state to another ArcState object.
- Specified by:
copyStateToin interfaceRrdUpdater<ArcState>- Parameters:
arcState- aRrdUpdaterobject.- Throws:
IOException- if the state cannot be read from the backend
getRrdBackend
Returns the underlying storage (backend) object which actually performs all I/O operations.- Specified by:
getRrdBackendin interfaceRrdUpdater<ArcState>- Returns:
- I/O backend object
getRrdAllocator
Required to implement RrdUpdater interface. You should never call this method directly.- Specified by:
getRrdAllocatorin interfaceRrdUpdater<ArcState>- Returns:
- Allocator object