org.jrobin.core

Class RrdMemoryBackend

public class RrdMemoryBackend extends RrdBackend

Backend to be used to store all RRD bytes in memory.

Constructor Summary
protected RrdMemoryBackend(String path)
Method Summary
voidclose()
This method is required by the base class definition, but it does not releases any memory resources at all.
longgetLength()
Returns the number of RRD bytes held in memory.
protected booleanisCachingAllowed()
This method is overriden to disable high-level caching in frontend JRobin classes.
protected voidread(long offset, byte[] b)
protected voidsetLength(long newLength)
Reserves a memory section as a RRD storage.
protected voidwrite(long offset, byte[] b)

Constructor Detail

RrdMemoryBackend

protected RrdMemoryBackend(String path)

Method Detail

close

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

getLength

public long getLength()
Returns the number of RRD bytes held in memory.

Returns: Number of all RRD bytes.

isCachingAllowed

protected boolean isCachingAllowed()
This method is overriden to disable high-level caching in frontend JRobin classes.

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

read

protected void read(long offset, byte[] b)

setLength

protected void setLength(long newLength)
Reserves a memory section as a RRD storage.

Parameters: newLength Number of bytes held in memory.

Throws: IOException Thrown in case of I/O error.

write

protected void write(long offset, byte[] b)