Class BackendFile

java.lang.Object
org.opends.server.backup.BackendFile

public final class BackendFile extends Object
This class is a wrapper around a backend file path and a backend file ID. The ID is the combination of the file name and its fingerprint. By default the file fingerprint is calculated with SHA256 but it is possible to provide a custom one.
See Also:
  • Constructor Details

    • BackendFile

      public BackendFile(Path path, Function<Path,String,IOException> fingerprintFunction)
      Creates a new backend file with the provided path and fingerprinting function. The fingerprint function should return a string that uniquely identifies this backend file content (not its name) in a space that can contain any backend file from any implementation and any Directory Server.
      Parameters:
      path - The path to the backend file.
      fingerprintFunction - the function for computing the backend file fingerprint.
  • Method Details

    • newBackendFile

      public static BackendFile newBackendFile(Path path)
      Creates a backendFile with the default fingerprinting function.
      Parameters:
      path - The path to the backend file.
      Returns:
      the backend file.