Record Class BackupDescriptorImpl

java.lang.Object
java.lang.Record
io.camunda.zeebe.backup.common.BackupDescriptorImpl
All Implemented Interfaces:
BackupDescriptor

public record BackupDescriptorImpl(Optional<String> snapshotId, long checkpointPosition, int numberOfPartitions, String brokerVersion) extends Record implements BackupDescriptor
  • Constructor Details

    • BackupDescriptorImpl

      public BackupDescriptorImpl(Optional<String> snapshotId, long checkpointPosition, int numberOfPartitions, String brokerVersion)
      Creates an instance of a BackupDescriptorImpl record class.
      Parameters:
      snapshotId - the value for the snapshotId record component
      checkpointPosition - the value for the checkpointPosition record component
      numberOfPartitions - the value for the numberOfPartitions record component
      brokerVersion - the value for the brokerVersion record component
  • Method Details

    • from

      public static BackupDescriptorImpl from(BackupDescriptor descriptor)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • snapshotId

      public Optional<String> snapshotId()
      Returns the value of the snapshotId record component.
      Specified by:
      snapshotId in interface BackupDescriptor
      Returns:
      the value of the snapshotId record component
    • checkpointPosition

      public long checkpointPosition()
      Returns the value of the checkpointPosition record component.
      Specified by:
      checkpointPosition in interface BackupDescriptor
      Returns:
      the value of the checkpointPosition record component
    • numberOfPartitions

      public int numberOfPartitions()
      Returns the value of the numberOfPartitions record component.
      Specified by:
      numberOfPartitions in interface BackupDescriptor
      Returns:
      the value of the numberOfPartitions record component
    • brokerVersion

      public String brokerVersion()
      Returns the value of the brokerVersion record component.
      Specified by:
      brokerVersion in interface BackupDescriptor
      Returns:
      the value of the brokerVersion record component