public class

RrdSafeFileBackendFactory

extends RrdFileBackendFactory
java.lang.Object
   ↳ org.rrd4j.core.RrdBackendFactory
     ↳ org.rrd4j.core.RrdFileBackendFactory
       ↳ org.rrd4j.core.RrdSafeFileBackendFactory

Class Overview

Factory class which creates actual RrdSafeFileBackend objects.

Summary

Constants
long LOCK_RETRY_PERIOD Default time between two consecutive file locking attempts.
long LOCK_WAIT_TIME Default time (in milliseconds) this backend will wait for a file lock.
Public Constructors
RrdSafeFileBackendFactory()
Public Methods
static long getLockRetryPeriod()
Returns time between two consecutive file locking attempts.
static long getLockWaitTime()
Returns time this backend will wait for a file lock.
String getName()
Returns the name (primary ID) for the factory.
static void setLockRetryPeriod(long lockRetryPeriod)
Sets time between two consecutive file locking attempts.
static void setLockWaitTime(long lockWaitTime)
Sets time this backend will wait for a file lock.
Protected Methods
RrdBackend open(String path, boolean readOnly)
Creates RrdSafeFileBackend object for the given file path.
[Expand]
Inherited Methods
From class org.rrd4j.core.RrdFileBackendFactory
From class org.rrd4j.core.RrdBackendFactory
From class java.lang.Object

Constants

public static final long LOCK_RETRY_PERIOD

Default time between two consecutive file locking attempts.

Constant Value: 50 (0x0000000000000032)

public static final long LOCK_WAIT_TIME

Default time (in milliseconds) this backend will wait for a file lock.

Constant Value: 3000 (0x0000000000000bb8)

Public Constructors

public RrdSafeFileBackendFactory ()

Public Methods

public static long getLockRetryPeriod ()

Returns time between two consecutive file locking attempts.

Returns
  • Time (im milliseconds) between two consecutive file locking attempts.

public static long getLockWaitTime ()

Returns time this backend will wait for a file lock.

Returns
  • Time (in milliseconds) this backend will wait for a file lock.

public String getName ()

Returns the name (primary ID) for the factory.

Returns
  • Name of the factory.

public static void setLockRetryPeriod (long lockRetryPeriod)

Sets time between two consecutive file locking attempts.

Parameters
lockRetryPeriod time (in milliseconds) between two consecutive file locking attempts.

public static void setLockWaitTime (long lockWaitTime)

Sets time this backend will wait for a file lock.

Parameters
lockWaitTime Maximum lock wait time (in milliseconds)

Protected Methods

protected RrdBackend open (String path, boolean readOnly)

Creates RrdSafeFileBackend object for the given file path.

Parameters
path File path
readOnly This parameter is ignored
Returns
  • RrdSafeFileBackend object which handles all I/O operations for the given file path
Throws
IOException Thrown in case of I/O error.