|
||||||||||
| 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.RrdFileBackend
org.jrobin.core.RrdNioBackend
public class RrdNioBackend
JRobin backend which is used to store RRD data to ordinary disk files by using fast java.nio.* package. This is the default backend engine since JRobin 1.4.0.
| Field Summary |
|---|
| Fields inherited from class org.jrobin.core.RrdFileBackend |
|---|
file, readOnly |
| Constructor Summary | |
|---|---|
protected |
RrdNioBackend(String path,
boolean readOnly,
int syncPeriod)
Creates RrdFileBackend object for the given file path, backed by java.nio.* classes. |
| Method Summary | |
|---|---|
void |
close()
Closes the underlying RRD file. |
protected void |
read(long offset,
byte[] b)
Reads a number of bytes from the RRD file on the disk |
protected void |
setLength(long newLength)
Sets length of the underlying RRD file. |
protected void |
sync()
This method forces all data cached in memory but not yet stored in the file, to be stored in it. |
protected void |
write(long offset,
byte[] b)
Writes bytes to the underlying RRD file on the disk |
| Methods inherited from class org.jrobin.core.RrdFileBackend |
|---|
getCanonicalPath, getCanonicalPath, getLength |
| Methods inherited from class org.jrobin.core.RrdBackend |
|---|
getPath, isCachingAllowed, readAll |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RrdNioBackend(String path,
boolean readOnly,
int syncPeriod)
throws IOException
path - Path to a filereadOnly - True, if file should be open in a read-only mode. False otherwisesyncPeriod - See RrdNioBackendFactory.setSyncPeriod(int) for explanation
IOException - Thrown in case of I/O error| Method Detail |
|---|
protected void setLength(long newLength)
throws IOException
setLength in class RrdFileBackendnewLength - Length of the RRD file
IOException - Thrown in case of I/O error.
protected void write(long offset,
byte[] b)
throws IOException
write in class RrdFileBackendoffset - Starting file offsetb - Bytes to be written.
IOException - Thrown in case of I/O error
protected void read(long offset,
byte[] b)
throws IOException
read in class RrdFileBackendoffset - Starting file offsetb - Buffer which receives bytes read from the file.
IOException - Thrown in case of I/O error.
public void close()
throws IOException
close in class RrdFileBackendIOException - Thrown in case of I/O errorprotected void sync()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||