public class

RrdNioBackendFactory

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

Class Overview

Factory class which creates actual RrdNioBackend objects. This is the default factory since 1.4.0 version

Summary

Constants
int DEFAULT_SYNC_CORE_POOL_SIZE The core pool size for the sync executor.
int DEFAULT_SYNC_PERIOD Period in seconds between consecutive synchronizations when sync-mode is set to SYNC_BACKGROUND.
Public Constructors
RrdNioBackendFactory()
Public Methods
String getName()
Returns the name (primary ID) for the factory.
static int getSyncPeriod()
Returns time between two consecutive background synchronizations.
static void setSyncPeriod(int syncPeriod)
Sets time between consecutive background synchronizations.
Protected Methods
RrdBackend open(String path, boolean readOnly)
Creates RrdNioBackend 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 int DEFAULT_SYNC_CORE_POOL_SIZE

The core pool size for the sync executor. Defaults to 6.

Constant Value: 6 (0x00000006)

public static final int DEFAULT_SYNC_PERIOD

Period in seconds between consecutive synchronizations when sync-mode is set to SYNC_BACKGROUND. By default in-memory cache will be transferred to the disc every 300 seconds (5 minutes). Default value can be changed via setSyncPeriod(int) method.

Constant Value: 300 (0x0000012c)

Public Constructors

public RrdNioBackendFactory ()

Public Methods

public String getName ()

Returns the name (primary ID) for the factory.

Returns
  • Name of the factory.

public static int getSyncPeriod ()

Returns time between two consecutive background synchronizations. If not changed via setSyncPeriod(int) method call, defaults to DEFAULT_SYNC_PERIOD. See setSyncPeriod(int) for more information.

Returns
  • Time in seconds between consecutive background synchronizations.

public static void setSyncPeriod (int syncPeriod)

Sets time between consecutive background synchronizations.

Parameters
syncPeriod Time in seconds between consecutive background synchronizations.

Protected Methods

protected RrdBackend open (String path, boolean readOnly)

Creates RrdNioBackend object for the given file path.

Parameters
path File path
readOnly True, if the file should be accessed in read/only mode. False otherwise.
Returns
  • RrdNioBackend object which handles all I/O operations for the given file path
Throws
IOException Thrown in case of I/O error.