Package org.opends.server.backup
Class BackupStorageConfig
java.lang.Object
org.opends.server.backup.BackupStorageConfig
Configuration of a backup storage.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionasPath()
Returns aPath
representation of the backup location.Returns the backup location.getProperty
(String key) Returns the value of the configuration of the backup storage for the specified key ornull
if there is no value.Returns the storage scheme that the backup storage should handle.boolean
Indicates whether this backup storage configuration configuration represents the configuration of a local file-system storage.static BackupStorageConfig
Returns a new backup storage configuration.
-
Field Details
-
FILE_SYSTEM_SCHEME
File system storage scheme.- See Also:
-
-
Method Details
-
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 givenlocation
does not represent a backup location
-
asPath
Returns aPath
representation of the backup location.- Returns:
- A
Path
representation of the backup location
-
getBackupLocation
Returns the backup location.- Returns:
- The backup location.
-
getStorageScheme
Returns the storage scheme that the backup storage should handle. For instance, if the backup location uri looks likegs://backupDirectory
, then this methods returnsgs
.- 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
Returns the value of the configuration of the backup storage for the specified key ornull
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.
-