java.lang.Object
org.rrd4j.core.RrdBackendFactory
org.rrd4j.core.RrdFileBackendFactory
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
RrdNioBackendFactory, RrdRandomAccessFileBackendFactory

public abstract class RrdFileBackendFactoryextends RrdBackendFactory
An abstract backend factory which is used to store RRD data to ordinary files on the disk.

Every backend factory storing RRD data as ordinary files should inherit from it, some check are done in the code for instanceof.

  • Constructor Details

    • RrdFileBackendFactory

      public RrdFileBackendFactory()
      Constructor for subclasses that build a backend storing RRD data in ordinary files.
  • Method Details

    • exists

      protected boolean exists(String path)
      Determines if a storage with the given path already exists.

      Method to determine if a file with the given path already exists.

      Specified by:
      exists in class RrdBackendFactory
      Parameters:
      path - File system path to probe for.
      Returns:
      true if a storage already exists at the given path
    • canStore

      public boolean canStore(URI uri)
      Tests whether this factory recognises a storage URI.
      Overrides:
      canStore in class RrdBackendFactory
      Parameters:
      uri - the candidate storage URI to test against this factory
      Returns:
      false unless a subclass overrides this to recognise its own URIs
    • getCanonicalUri

      public URI getCanonicalUri(URI uri)
      Description copied from class: RrdBackendFactory
      Ensure that an URI is returned in a non-ambiguous way.
      Overrides:
      getCanonicalUri in class RrdBackendFactory
      Parameters:
      uri - a valid URI for this backend.
      Returns:
      the canonized URI.
    • getUri

      public URI getUri(String path)
      Description copied from class: RrdBackendFactory
      Transform an path in a valid URI for this backend.
      Overrides:
      getUri in class RrdBackendFactory
      Parameters:
      path - a path local to the current backend.
      Returns:
      an URI that the current backend can handle.
    • getPath

      public String getPath(URI uri)
      Description copied from class: RrdBackendFactory
      Extract the local path from an URI.
      Overrides:
      getPath in class RrdBackendFactory
      Parameters:
      uri - The URI to parse.
      Returns:
      the local path from the URI.