public abstract class RrdFileBackend extends RrdBackend
Every backend storing RRD data as ordinary files should inherit from it, some check are done in the code for instanceof.
Modifier and Type | Field and Description |
---|---|
protected File |
file |
protected boolean |
readOnly
Read/write file status.
|
Modifier | Constructor and Description |
---|---|
protected |
RrdFileBackend(String path,
boolean readOnly)
Constructor for RrdFileBackend.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes the underlying RRD file.
|
String |
getCanonicalPath()
Returns canonical path to the file on the disk.
|
static String |
getCanonicalPath(String path)
Returns canonical path to the file on the disk.
|
long |
getLength()
Returns the number of RRD bytes in the underlying storage.
|
getPath, isCachingAllowed, read, readAll, setLength, write
protected final boolean readOnly
protected final File file
public static String getCanonicalPath(String path) throws IOException
path
- File pathIOException
- Thrown in case of I/O errorpublic String getCanonicalPath() throws IOException
IOException
- Thrown in case of I/O errorpublic abstract void close() throws IOException
close
in class RrdBackend
IOException
- Thrown in case of I/O errorpublic long getLength() throws IOException
getLength
in class RrdBackend
IOException
- Thrown in case of I/O error.Copyright © 2015. All rights reserved.