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 Details

    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(BackupId that)
      Specified by:
      compareTo in interface Comparable<BackupId>