|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rrd4j.core.RrdBackend
org.rrd4j.core.RrdByteArrayBackend
public abstract class RrdByteArrayBackend
Abstract byte array based backend.
Field Summary | |
---|---|
protected byte[] |
buffer
|
Constructor Summary | |
---|---|
protected |
RrdByteArrayBackend(String path)
|
Method Summary | |
---|---|
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 boolean |
isCachingAllowed()
This method is overridden to disable high-level caching in frontend RRD4J classes. |
protected void |
read(long offset,
byte[] bytes)
Reads an array of bytes from the underlying storage starting from the given storage offset. |
protected void |
setLength(long length)
Reserves a memory section as a RRD storage. |
protected void |
write(long offset,
byte[] bytes)
Writes an array of bytes to the underlying storage starting from the given storage offset. |
Methods inherited from class org.rrd4j.core.RrdBackend |
---|
getPath, readAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] buffer
Constructor Detail |
---|
protected RrdByteArrayBackend(String path)
Method Detail |
---|
protected void write(long offset, byte[] bytes) throws IOException
RrdBackend
write
in class RrdBackend
offset
- Storage offset.bytes
- Array of bytes that should be copied to the underlying storage
IOException
- Thrown in case of I/O errorprotected void read(long offset, byte[] bytes) throws IOException
RrdBackend
read
in class RrdBackend
offset
- Storage offset.bytes
- Array which receives bytes from the underlying storage
IOException
- Thrown in case of I/O errorpublic long getLength()
getLength
in class RrdBackend
protected void setLength(long length) throws IOException
setLength
in class RrdBackend
length
- Number of bytes held in memory.
IOException
- Thrown in case of I/O error.public void close() throws IOException
close
in class RrdBackend
IOException
- Thrown in case of I/O errorprotected boolean isCachingAllowed()
isCachingAllowed
in class RrdBackend
false
. There is no need to cache anything in high-level classes
since all RRD bytes are already in memory.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |