Package org.opends.server.backup
Class BackupId
java.lang.Object
org.opends.server.backup.BackupId
- All Implemented Interfaces:
Comparable<BackupId>
A backup identifier, it is made out of a backend name and a tag.
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Returns the name of the backend that was backed up.Returns the timestamp of the backup.Returns a string version of this backup timestamp in the format yyyyMMddHHmmssSSS.int
hashCode()
static BackupId
newBackupId
(String backendName, Instant timestamp) Creates a new backup ID using the provided parameters.static BackupId
Parses a backup ID from a string.toString()
-
Method Details
-
newBackupId
Creates a new backup ID using the provided parameters.- Parameters:
backendName
- the backend name.timestamp
- the timestamp of the backup.- Returns:
- a new backup ID
-
parse
Parses a backup ID from a string.- Parameters:
backupId
- String representation of a backup ID.- Returns:
- a new backup ID
- Throws:
LocalizedIllegalArgumentException
- if the backup id is invalid and cannot be parsed
-
getBackendName
Returns the name of the backend that was backed up.- Returns:
- the backend name
-
getTimestamp
Returns the timestamp of the backup.- Returns:
- the timestamp of the backup
-
getTimestampString
Returns a string version of this backup timestamp in the format yyyyMMddHHmmssSSS.- Returns:
- a string version of this backup timestamp in the format yyyyMMddHHmmssSSS.
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<BackupId>
-