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
-
Fields inherited from class org.rrd4j.core.RrdBackend
BYTEORDER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRrdMemoryBackend(String path, AtomicReference<ByteBuffer> refbb)Constructor for RrdMemoryBackend.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()This method is required by the base class definition, but it does not releases any memory resources at all.longgetLength()Returns the number of RRD bytes in the underlying storage.protected voidsetLength(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 Detail
-
RrdMemoryBackend
protected RrdMemoryBackend(String path, AtomicReference<ByteBuffer> refbb)
Constructor for RrdMemoryBackend.
- Parameters:
path- aStringobject.refbb-
-
-
Method Detail
-
setLength
protected void setLength(long length) throws IOExceptionDescription copied from class:RrdBackendSets 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:
setLengthin classRrdBackend- Parameters:
length- Length of the underlying RRD storage in bytes.- Throws:
IOException- Thrown in case of I/O error.
-
getLength
public long getLength() throws IOExceptionDescription copied from class:RrdBackendReturns the number of RRD bytes in the underlying storage.- Specified by:
getLengthin classRrdBackend- Returns:
- Number of RRD bytes in the storage.
- Throws:
IOException- Thrown in case of I/O error.
-
close
protected void close() throws IOExceptionThis method is required by the base class definition, but it does not releases any memory resources at all.- Overrides:
closein classByteBufferBackend- Throws:
IOException- if any.
-
-