public class RrdNioBackend extends RrdFileBackend
file
修飾子 | コンストラクタ | 説明 |
---|---|---|
protected |
RrdNioBackend(java.lang.String path,
boolean readOnly,
int syncPeriod) |
Creates RrdFileBackend object for the given file path, backed by
java.nio.* classes.
|
protected |
RrdNioBackend(java.lang.String path,
boolean readOnly,
SyncManager syncManager) |
Creates RrdFileBackend object for the given file path, backed by
java.nio.* classes.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
close() |
Closes the underlying RRD file.
|
protected void |
finalize() |
|
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
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPath, isCachingAllowed, isInstanceCreated, isReadOnly, readAll, readDouble, readDouble, readInt, readLong, readString, writeDouble, writeDouble, writeDouble, writeInt, writeLong, writeString
getCanonicalPath, getCanonicalPath, getLength
protected RrdNioBackend(java.lang.String path, boolean readOnly, int syncPeriod) throws java.io.IOException
SyncManager
for each instance, which is very inefficient.
It is recommended that you instead use the
RrdNioBackend(String, boolean, SyncManager)
constructor instead.path
- Path to a JRB file.readOnly
- True, if file should be open in a read-only mode. False
otherwisesyncPeriod
- How often (in seconds) to sync MMAP'd RRD data to diskjava.io.IOException
- Thrown in case of I/O errorprotected RrdNioBackend(java.lang.String path, boolean readOnly, SyncManager syncManager) throws java.io.IOException
path
- Path to a filereadOnly
- True, if file should be open in a read-only mode. False
otherwise.syncManager
- An object for managing synchronization of NIO-backed RRDs,
generally owned by the backend factory. If null, MMAP'd
data will only be synchronized to disk upon unmap. Note
that if the file is opened read-only, the SyncManager is
ignored. unmapFile()
java.io.IOException
- Thrown in case of I/O errorprotected void finalize() throws java.lang.Throwable
finalize
クラス内 java.lang.Object
java.lang.Throwable
protected void setLength(long newLength) throws java.io.IOException
setLength
クラス内 RrdFileBackend
newLength
- Length of the RRD filejava.io.IOException
- Thrown in case of I/O error.protected void write(long offset, byte[] b) throws java.io.IOException
write
クラス内 RrdFileBackend
offset
- Starting file offsetb
- Bytes to be written.java.io.IOException
- Thrown in case of I/O errorprotected void read(long offset, byte[] b) throws java.io.IOException
read
クラス内 RrdFileBackend
offset
- Starting file offsetb
- Buffer which receives bytes read from the file.java.io.IOException
- Thrown in case of I/O error.public void close() throws java.io.IOException
close
クラス内 RrdFileBackend
java.io.IOException
- Thrown in case of I/O errorprotected void sync()