Class RrdByteArrayBackend


  • public abstract class RrdByteArrayBackend
    extends ByteBufferBackend
    Abstract byte array based backend.
    • Constructor Detail

      • RrdByteArrayBackend

        protected RrdByteArrayBackend​(String path)

        Constructor for RrdByteArrayBackend.

        Parameters:
        path - a String object.
    • Method Detail

      • setBuffer

        protected void setBuffer​(byte[] buffer)
      • getBuffer

        protected byte[] getBuffer()
      • getLength

        public long getLength()
        Returns the number of RRD bytes in the underlying storage.
        Specified by:
        getLength in class RrdBackend
        Returns:
        Number of RRD bytes held in memory.
      • setLength

        protected void setLength​(long length)
                          throws IOException
        Sets the number of bytes in the underlying RRD storage. This method is called only once, immediately after a new RRD storage gets created.

        It will reserves a memory section as a RRD storage.

        Specified by:
        setLength in class RrdBackend
        Parameters:
        length - Length of the underlying RRD storage in bytes.
        Throws:
        IllegalArgumentException - if length is bigger that the possible length.
        IOException - Thrown in case of I/O error.