|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrobin.core.RrdBackend
org.jrobin.core.RrdMemoryBackend
public class RrdMemoryBackend
Backend to be used to store all RRD bytes in memory.
| Constructor Summary | |
|---|---|
protected |
RrdMemoryBackend(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 overriden to disable high-level caching in frontend JRobin classes. |
protected void |
read(long offset,
byte[] b)
Reads an array of bytes from the underlying storage starting from the given storage offset. |
protected void |
setLength(long newLength)
Reserves a memory section as a RRD storage. |
protected void |
write(long offset,
byte[] b)
Writes an array of bytes to the underlying storage starting from the given storage offset. |
| Methods inherited from class org.jrobin.core.RrdBackend |
|---|
getPath, readAll |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RrdMemoryBackend(String path)
| Method Detail |
|---|
protected void write(long offset,
byte[] b)
throws IOException
RrdBackend
write in class RrdBackendoffset - Storage offset.b - Array of bytes that should be copied to the underlying storage
IOException - Thrown in case of I/O error
protected void read(long offset,
byte[] b)
throws IOException
RrdBackend
read in class RrdBackendoffset - Storage offset.b - 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 newLength)
throws IOException
setLength in class RrdBackendnewLength - Number of bytes held in memory.
IOException - Thrown in case of I/O error.public void close()
close in class RrdBackendprotected boolean isCachingAllowed()
isCachingAllowed in class RrdBackendfalse. 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 | |||||||||