Class BackupStorageConfig


  • public final class BackupStorageConfig
    extends Object
    Configuration of a backup storage.
    • Method Detail

      • newBackupStorageConfig

        public static BackupStorageConfig newBackupStorageConfig​(Path baseDirectory,
                                                                 String backupLocation,
                                                                 Map<String,​String> properties)
        Returns a new backup storage configuration.
        Parameters:
        baseDirectory - The base directory that should be used to resolve the backup location if this one is a relative local file-systems path.
        backupLocation - The location of the backup.
        properties - The configuration properties of the backup storage.
        Returns:
        A new backup storage configuration
        Throws:
        LocalizedIllegalArgumentException - whenever the given location does not represent a backup location
      • asPath

        public Path asPath()
        Returns a Path representation of the backup location.
        Returns:
        A Path representation of the backup location
      • getBackupLocation

        public URI getBackupLocation()
        Returns the backup location.
        Returns:
        The backup location.
      • getStorageScheme

        public String getStorageScheme()
        Returns the storage scheme that the backup storage should handle. For instance, if the backup location uri looks like gs://backupDirectory, then this methods returns gs.
        Returns:
        The storage scheme.
      • isLocalFileSystemLocation

        public boolean isLocalFileSystemLocation()
        Indicates whether this backup storage configuration configuration represents the configuration of a local file-system storage.
        Returns:
        true if and only if this backup storage configuration represents the configuration of a local file-system storage.
      • getProperty

        public String getProperty​(String key)
        Returns the value of the configuration of the backup storage for the specified key or null if there is no value.
        Parameters:
        key - The key of a property of the configuration of the backup storage.
        Returns:
        the value of the configuration of the backup storage for the specified key or null if there is no value.