Package org.opends.server.backup
Class BackupStorageConfig
- java.lang.Object
-
- org.opends.server.backup.BackupStorageConfig
-
public final class BackupStorageConfig extends Object
Configuration of a backup storage.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE_SYSTEM_SCHEME
File system storage scheme.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
asPath()
Returns aPath
representation of the backup location.URI
getBackupLocation()
Returns the backup location.String
getProperty(String key)
Returns the value of the configuration of the backup storage for the specified key ornull
if there is no value.String
getStorageScheme()
Returns the storage scheme that the backup storage should handle.boolean
isLocalFileSystemLocation()
Indicates whether this backup storage configuration configuration represents the configuration of a local file-system storage.static BackupStorageConfig
newBackupStorageConfig(Path baseDirectory, String backupLocation, Map<String,String> properties)
Returns a new backup storage configuration.
-
-
-
Field Detail
-
FILE_SYSTEM_SCHEME
public static final String FILE_SYSTEM_SCHEME
File system storage scheme.- See Also:
- Constant Field Values
-
-
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 givenlocation
does not represent a backup location
-
asPath
public Path asPath()
Returns aPath
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 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
public String getProperty(String key)
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.
-
-