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 and Description
    --- | ---
    `protected` | `RrdMemoryBackend(String path, AtomicReference<ByteBuffer> refbb)` Constructor for RrdMemoryBackend.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RrdMemoryBackend

          protected RrdMemoryBackend(String path,
                                     AtomicReference<ByteBuffer> refbb)

      Constructor for RrdMemoryBackend.
      Parameters:
        `path` - a `String` object.
        `refbb` -

  - ### Method Detail

    - #### close

          protected void close()

      This method is required by the base class definition, but it does not releases any memory resources at all.
      Overrides:
        `close` in class `ByteBufferBackend`

    - #### getLength

          public long getLength()

      Description copied from class: `RrdBackend`
      Returns the number of RRD bytes in the underlying storage.
      Specified by:
        `getLength` in class `RrdBackend`
      Returns:
        Number of RRD bytes in the storage.

    - #### setLength

          protected void setLength(long length)

      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 class `RrdBackend`
      Parameters:
        `length` - Length of the underlying RRD storage in bytes.