Record Class BackupIdentifierWildcardImpl

java.lang.Object
java.lang.Record
io.camunda.zeebe.backup.common.BackupIdentifierWildcardImpl
All Implemented Interfaces:
BackupIdentifierWildcard

public record BackupIdentifierWildcardImpl(Optional<Integer> nodeId, Optional<Integer> partitionId, Optional<Long> checkpointId) extends Record implements BackupIdentifierWildcard
  • Constructor Details

    • BackupIdentifierWildcardImpl

      public BackupIdentifierWildcardImpl(Optional<Integer> nodeId, Optional<Integer> partitionId, Optional<Long> checkpointId)
      Creates an instance of a BackupIdentifierWildcardImpl record class.
      Parameters:
      nodeId - the value for the nodeId record component
      partitionId - the value for the partitionId record component
      checkpointId - the value for the checkpointId record component
  • Method Details

    • matches

      public boolean matches(BackupIdentifier id)
      Description copied from interface: BackupIdentifierWildcard
      Predicate that tries to match an id to this wildcard.
      Specified by:
      matches in interface BackupIdentifierWildcard
      Returns:
      true if the given id matches the wildcard, otherwise false.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • nodeId

      public Optional<Integer> nodeId()
      Returns the value of the nodeId record component.
      Specified by:
      nodeId in interface BackupIdentifierWildcard
      Returns:
      the value of the nodeId record component
    • partitionId

      public Optional<Integer> partitionId()
      Returns the value of the partitionId record component.
      Specified by:
      partitionId in interface BackupIdentifierWildcard
      Returns:
      the value of the partitionId record component
    • checkpointId

      public Optional<Long> checkpointId()
      Returns the value of the checkpointId record component.
      Specified by:
      checkpointId in interface BackupIdentifierWildcard
      Returns:
      the value of the checkpointId record component