public class

RrdSafeFileBackend

extends RrdFileBackend
java.lang.Object
   ↳ org.rrd4j.core.RrdBackend
     ↳ org.rrd4j.core.RrdFileBackend
       ↳ org.rrd4j.core.RrdSafeFileBackend

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

[Expand]
Inherited Fields
From class org.rrd4j.core.RrdFileBackend
Public Constructors
RrdSafeFileBackend(String path, long lockWaitTime, long lockRetryPeriod)
Creates RrdFileBackend object for the given file path, backed by RandomAccessFile object.
Public Methods
void close()
Closes the underlying RRD file.
static String getLockInfo()
Protected Methods
boolean isCachingAllowed()
Defines the caching policy for this backend.
[Expand]
Inherited Methods
From class org.rrd4j.core.RrdFileBackend
From class org.rrd4j.core.RrdBackend
From class java.lang.Object

Public Constructors

public RrdSafeFileBackend (String path, long lockWaitTime, long lockRetryPeriod)

Creates RrdFileBackend object for the given file path, backed by RandomAccessFile object.

Parameters
path Path to a file
Throws
IOException Thrown in case of I/O error

Public Methods

public void close ()

Closes the underlying RRD file.

Throws
IOException

public static String getLockInfo ()

Protected Methods

protected boolean isCachingAllowed ()

Defines the caching policy for this backend.

Returns
  • false