|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.BackupDirectory
@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class BackupDirectory
This class defines a data structure for holding information about a filesystem directory that contains data for one or more backups associated with a backend. Only backups for a single backend may be placed in any given directory.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_BACKEND_CONFIG_DN
The name of the property that will be used to provide the DN of the configuration entry for the backend associated with the backups in this directory. |
Constructor Summary | |
---|---|
BackupDirectory(java.lang.String path,
DN configEntryDN)
Creates a new backup directory object with the provided information. |
|
BackupDirectory(java.lang.String path,
DN configEntryDN,
java.util.LinkedHashMap<java.lang.String,BackupInfo> backups)
Creates a new backup directory object with the provided information. |
Method Summary | |
---|---|
void |
addBackup(BackupInfo backupInfo)
Adds information about the provided backup to this backup directory. |
BackupInfo |
getBackupInfo(java.lang.String backupID)
Retrieves the backup info structure for the backup with the specified ID. |
java.util.LinkedHashMap<java.lang.String,BackupInfo> |
getBackups()
Retrieves the set of backups in this backup directory, as a mapping between the backup ID and the associated backup info. |
DN |
getConfigEntryDN()
Retrieves the DN of the configuration entry for the backend with which this backup directory is associated. |
java.lang.String |
getDescriptorPath()
Retrieves a path to the backup descriptor file that should be used for this backup directory. |
BackupInfo |
getLatestBackup()
Retrieves the most recent backup for this backup directory, according to the backup date. |
java.lang.String |
getPath()
Retrieves the path to the directory containing the backup file(s). |
static BackupDirectory |
readBackupDirectoryDescriptor(java.lang.String path)
Reads the backup descriptor file in the specified path and uses the information it contains to create a new backup directory structure. |
void |
removeBackup(java.lang.String backupID)
Removes the backup with the specified backup ID from this backup directory. |
void |
writeBackupDirectoryDescriptor()
Writes the descriptor with the information contained in this structure to disk in the appropriate directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_BACKEND_CONFIG_DN
Constructor Detail |
---|
public BackupDirectory(java.lang.String path, DN configEntryDN)
path
- The path to the directory containing the
backup file(s).configEntryDN
- The DN of the configuration entry for the
backend with which this backup directory
is associated.public BackupDirectory(java.lang.String path, DN configEntryDN, java.util.LinkedHashMap<java.lang.String,BackupInfo> backups)
path
- The path to the directory containing the
backup file(s).configEntryDN
- The DN of the configuration entry for the
backend with which this backup directory
is associated.backups
- Information about the set of backups
available within the specified directory.Method Detail |
---|
public java.lang.String getPath()
public DN getConfigEntryDN()
public java.util.LinkedHashMap<java.lang.String,BackupInfo> getBackups()
public BackupInfo getBackupInfo(java.lang.String backupID)
backupID
- The backup ID for the structure to retrieve.
null
if no such structure exists.public BackupInfo getLatestBackup()
null
if
there are no backups in the backup directory.public void addBackup(BackupInfo backupInfo) throws ConfigException
backupInfo
- The backup info structure for the backup to
be added.
ConfigException
- If another backup already exists with
the same backup ID.public void removeBackup(java.lang.String backupID) throws ConfigException
backupID
- The backup ID for the backup to remove from
this backup directory.
ConfigException
- If it is not possible to remove the
requested backup for some reason (e.g.,
no such backup exists, or another
backup is dependent on it).public java.lang.String getDescriptorPath()
public void writeBackupDirectoryDescriptor() throws java.io.IOException
java.io.IOException
- If a problem occurs while writing to disk.public static BackupDirectory readBackupDirectoryDescriptor(java.lang.String path) throws java.io.IOException, ConfigException
path
- The path to the directory containing the backup
descriptor file to read.
java.io.IOException
- If a problem occurs while trying to read
the contents of the descriptor file.
ConfigException
- If the contents of the descriptor file
cannot be parsed to create a backup
directory structure.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |