Class RrdNioBackendFactory

java.lang.Object
org.jrobin.core.RrdBackendFactory
org.jrobin.core.RrdFileBackendFactory
net.bull.javamelody.internal.model.RrdNioBackendFactory

public class RrdNioBackendFactory extends org.jrobin.core.RrdFileBackendFactory
Factory class which creates actual RrdNioBackend objects. This is the default factory since 1.4.0 version
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Period in seconds between consecutive synchronizations when sync-mode is set to SYNC_BACKGROUND.
    static final String
    factory name, "NIO-JavaMelody".

    Fields inherited from class org.jrobin.core.RrdFileBackendFactory

    NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of this factory.
    static int
    Returns time between two consecutive background synchronizations.
    protected org.jrobin.core.RrdBackend
    open(String path, boolean readOnly)
    Creates RrdNioBackend object for the given file path.
    static void
    setSyncPeriod(int syncPeriod)
    Sets time between consecutive background synchronizations.

    Methods inherited from class org.jrobin.core.RrdFileBackendFactory

    exists

    Methods inherited from class org.jrobin.core.RrdBackendFactory

    getDefaultFactory, getFactory, registerAndSetAsDefaultFactory, registerFactory, setDefaultFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FACTORY_NAME

      public static final String FACTORY_NAME
      factory name, "NIO-JavaMelody".
      See Also:
    • DEFAULT_SYNC_PERIOD

      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.
      See Also:
  • Constructor Details

    • RrdNioBackendFactory

      public RrdNioBackendFactory()
  • Method Details

    • getSyncPeriod

      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.
    • setSyncPeriod

      public static void setSyncPeriod(int syncPeriod)
      Sets time between consecutive background synchronizations.
      Parameters:
      syncPeriod - Time in seconds between consecutive background synchronizations.
    • open

      protected org.jrobin.core.RrdBackend open(String path, boolean readOnly) throws IOException
      Creates RrdNioBackend object for the given file path.
      Overrides:
      open in class org.jrobin.core.RrdFileBackendFactory
      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.
    • getFactoryName

      public String getFactoryName()
      Returns the name of this factory.
      Overrides:
      getFactoryName in class org.jrobin.core.RrdFileBackendFactory
      Returns:
      Factory name (equals to string "NIO-JavaMelody")