Class Overview
Backend which is used to store RRD data to ordinary files on the disk, using locking. This backend
is SAFE: it locks the underlying RRD file during update/fetch operations, and caches only static
parts of a RRD file in memory. Therefore, this backend is safe to be used when RRD files should
be shared between several JVMs at the same time. However, this backend is a little bit slow
since it does not use fast java.nio.* package (it's still based on the RandomAccessFile class).
Summary
Public Constructors |
|
RrdSafeFileBackend(String path, long lockWaitTime, long lockRetryPeriod)
Creates RrdFileBackend object for the given file path, backed by RandomAccessFile object.
|
Protected Methods |
boolean
|
isCachingAllowed()
Defines the caching policy for this backend.
|
[Expand]
Inherited Methods |
From class
org.rrd4j.core.RrdFileBackend
void
|
close()
Closes the underlying RRD file.
|
static
String
|
getCanonicalPath(String path)
Returns canonical path to the file on the disk.
|
String
|
getCanonicalPath()
Returns canonical path to the file on the disk.
|
long
|
getLength()
Returns RRD file length.
|
void
|
read(long offset, byte[] b)
Reads a number of bytes from the RRD file on the disk
|
void
|
setLength(long length)
Sets length of the underlying RRD file.
|
void
|
write(long offset, byte[] b)
Writes bytes to the underlying RRD file on the disk
|
|
From class
org.rrd4j.core.RrdBackend
void
|
close()
Closes the underlying backend.
|
abstract
long
|
getLength()
Returns the number of RRD bytes in the underlying storage.
|
String
|
getPath()
Returns path to the storage.
|
boolean
|
isCachingAllowed()
This method suggests the caching policy to the Rrd4j frontend (high-level) classes.
|
abstract
void
|
read(long offset, byte[] b)
Reads an array of bytes from the underlying storage starting from the given
storage offset.
|
final
byte[]
|
readAll()
Reads all RRD bytes from the underlying storage
|
abstract
void
|
setLength(long length)
Sets the number of bytes in the underlying RRD storage.
|
abstract
void
|
write(long offset, byte[] b)
Writes an array of bytes to the underlying storage starting from the given
storage offset.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
RrdSafeFileBackend
(String path, long lockWaitTime, long lockRetryPeriod)
Creates RrdFileBackend object for the given file path, backed by RandomAccessFile object.
Public Methods
public
void
close
()
Closes the underlying RRD file.
public
static
String
getLockInfo
()
Protected Methods
protected
boolean
isCachingAllowed
()
Defines the caching policy for this backend.