All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
RrdSafeFileBackendFactory

@RrdBackendAnnotation(name="FILE", shouldValidateHeader=true) public class RrdRandomAccessFileBackendFactoryextends RrdFileBackendFactory
Factory class which creates actual RrdRandomAccessFileBackend objects. This was the default backend factory in Rrd4j before 1.4.0 release.
  • Constructor Details

    • RrdRandomAccessFileBackendFactory

      public RrdRandomAccessFileBackendFactory()
      A stateless factory: open(String, boolean) builds a fresh RrdRandomAccessFileBackend per call, so a bare instance is ready to use.
  • Method Details

    • open

      protected RrdBackend open(String path, boolean readOnly) throws IOException
      Opens the backend serving a storage path.

      Creates RrdFileBackend object for the given file path.

      Specified by:
      open in class RrdBackendFactory
      Parameters:
      path - the storage path, relative to this factory's root URI
      readOnly - true to open the storage for reading only, false to allow writes
      Returns:
      the backend that performs all I/O for the given storage path
      Throws:
      IOException - if the storage cannot be opened