Package org.rrd4j.core
Class RrdMemoryBackend
java.lang.Object
org.rrd4j.core.RrdBackend
org.rrd4j.core.ByteBufferBackend
org.rrd4j.core.RrdMemoryBackend
public class RrdMemoryBackend extends ByteBufferBackend
Backend to be used to store all RRD bytes in memory.
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
RrdMemoryBackend(String path, AtomicReference<ByteBuffer> refbb)
Constructor for RrdMemoryBackend. -
Method Summary
Modifier and Type Method Description protected void
close()
This method is required by the base class definition, but it does not releases any memory resources at all.long
getLength()
Returns the number of RRD bytes in the underlying storage.protected void
setLength(long length)
Sets the number of bytes in the underlying RRD storage.Methods inherited from class org.rrd4j.core.ByteBufferBackend
getCharBuffer, isDirty, read, readDouble, readDouble, readInt, readLong, readShort, rrdClose, setByteBuffer, write, writeDouble, writeDouble, writeDouble, writeInt, writeLong, writeShort, writeString
Methods inherited from class org.rrd4j.core.RrdBackend
done, getFactory, getPath, getUri, isCachingAllowed, isInstanceCreated, readAll, readString, writeString
-
Constructor Details
-
RrdMemoryBackend
Constructor for RrdMemoryBackend.
- Parameters:
path
- aString
object.refbb
-
-
-
Method Details
-
setLength
Description copied from class:RrdBackend
Sets the number of bytes in the underlying RRD storage. This method is called only once, immediately after a new RRD storage gets created.- Specified by:
setLength
in classRrdBackend
- Parameters:
length
- Length of the underlying RRD storage in bytes.- Throws:
IOException
- Thrown in case of I/O error.
-
getLength
Description copied from class:RrdBackend
Returns the number of RRD bytes in the underlying storage.- Specified by:
getLength
in classRrdBackend
- Returns:
- Number of RRD bytes in the storage.
- Throws:
IOException
- Thrown in case of I/O error.
-
close
This method is required by the base class definition, but it does not releases any memory resources at all.- Overrides:
close
in classByteBufferBackend
- Throws:
IOException
- if any.
-