org.jrobin.core
public class RrdNioBackend extends RrdFileBackend
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
|
Parameters: path Path to a file readOnly True, if file should be open in a read-only mode. False otherwise syncPeriod See RrdNioBackendFactory for explanation
Throws: IOException Thrown in case of I/O error
Throws: IOException Thrown in case of I/O error
Parameters: offset Starting file offset b Buffer which receives bytes read from the file.
Parameters: newLength Length of the RRD file
Throws: IOException Thrown in case of I/O error.
Parameters: offset Starting file offset b Bytes to be written.