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 StringFILE_SYSTEM_SCHEMEFile system storage scheme.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PathasPath()Returns aPathrepresentation of the backup location.URIgetBackupLocation()Returns the backup location.StringgetProperty(String key)Returns the value of the configuration of the backup storage for the specified key ornullif there is no value.StringgetStorageScheme()Returns the storage scheme that the backup storage should handle.booleanisLocalFileSystemLocation()Indicates whether this backup storage configuration configuration represents the configuration of a local file-system storage.static BackupStorageConfignewBackupStorageConfig(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 givenlocationdoes not represent a backup location
-
asPath
public Path asPath()
Returns aPathrepresentation of the backup location.- Returns:
- A
Pathrepresentation 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:
trueif 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 ornullif 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
nullif there is no value.
-
-