Package org.opends.server.backup
Class BackupId
- java.lang.Object
-
- org.opends.server.backup.BackupId
-
- All Implemented Interfaces:
Comparable<BackupId>
public final class BackupId extends Object implements Comparable<BackupId>
A backup identifier, it is made out of a backend name and a tag.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BackupId that)
boolean
equals(Object o)
String
getBackendName()
Returns the name of the backend that was backed up.Instant
getTimestamp()
Returns the timestamp of the backup.String
getTimestampString()
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
parse(String backupId)
Parses a backup ID from a string.String
toString()
-
-
-
Method Detail
-
newBackupId
public static BackupId newBackupId(String backendName, Instant timestamp)
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
public static BackupId parse(String backupId)
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
public String getBackendName()
Returns the name of the backend that was backed up.- Returns:
- the backend name
-
getTimestamp
public Instant getTimestamp()
Returns the timestamp of the backup.- Returns:
- the timestamp of the backup
-
getTimestampString
public String 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.
-
compareTo
public int compareTo(BackupId that)
- Specified by:
compareTo
in interfaceComparable<BackupId>
-
-