public abstract class

RrdByteArrayBackend

extends RrdBackend
java.lang.Object
   ↳ org.rrd4j.core.RrdBackend
     ↳ org.rrd4j.core.RrdByteArrayBackend
Known Direct Subclasses

Class Overview

Abstract byte array based backend.

Summary

Protected Constructors
RrdByteArrayBackend(String path)
Public Methods
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 held in memory.
Protected Methods
boolean isCachingAllowed()
This method is overriden to disable high-level caching in frontend RRD4J classes.
synchronized void read(long offset, byte[] bytes)
Reads an array of bytes from the underlying storage starting from the given storage offset.
void setLength(long length)
Reserves a memory section as a RRD storage.
synchronized void write(long offset, byte[] bytes)
Writes an array of bytes to the underlying storage starting from the given storage offset.
[Expand]
Inherited Methods
From class org.rrd4j.core.RrdBackend
From class java.lang.Object

Protected Constructors

protected RrdByteArrayBackend (String path)

Public Methods

public void close ()

This method is required by the base class definition, but it does not releases any memory resources at all.

Throws
IOException

public long getLength ()

Returns the number of RRD bytes held in memory.

Returns
  • Number of all RRD bytes.

Protected Methods

protected boolean isCachingAllowed ()

This method is overriden to disable high-level caching in frontend RRD4J classes.

Returns
  • Always returns false. There is no need to cache anything in high-level classes since all RRD bytes are already in memory.

protected synchronized void read (long offset, byte[] bytes)

Reads an array of bytes from the underlying storage starting from the given storage offset.

Parameters
offset Storage offset.
bytes Array which receives bytes from the underlying storage
Throws
IOException

protected void setLength (long length)

Reserves a memory section as a RRD storage.

Parameters
length Number of bytes held in memory.
Throws
IOException Thrown in case of I/O error.

protected synchronized void write (long offset, byte[] bytes)

Writes an array of bytes to the underlying storage starting from the given storage offset.

Parameters
offset Storage offset.
bytes Array of bytes that should be copied to the underlying storage
Throws
IOException