Record Class ReplicatorOrder

java.lang.Object
java.lang.Record
io.clonecloudstore.replicator.model.ReplicatorOrder

public record ReplicatorOrder(String opId, String fromSite, String toSite, String clientId, String bucketName, String objectName, long size, String hash, ReplicatorConstants.Action action) extends Record
  • Constructor Details

    • ReplicatorOrder

      public ReplicatorOrder(String opId, String fromSite, String toSite, String clientId, String bucketName, ReplicatorConstants.Action action)
    • ReplicatorOrder

      public ReplicatorOrder(ReplicatorOrder from, String toSite)
    • ReplicatorOrder

      public ReplicatorOrder(ReplicatorOrder from, ReplicatorConstants.Action action)
    • ReplicatorOrder

      public ReplicatorOrder(String opId, String fromSite, String toSite, String clientId, String bucketName, String objectName, long size, String hash, ReplicatorConstants.Action action)
      Creates an instance of a ReplicatorOrder record class.
      Parameters:
      opId - the value for the opId record component
      fromSite - the value for the fromSite record component
      toSite - the value for the toSite record component
      clientId - the value for the clientId record component
      bucketName - the value for the bucketName record component
      objectName - the value for the objectName record component
      size - the value for the size record component
      hash - the value for the hash record component
      action - the value for the action record component
  • Method Details

    • toString

      public 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
    • equals

      public 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.
    • hashCode

      public 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
    • getHeaders

      public Map<String,String> getHeaders()
    • opId

      public String opId()
      Returns the value of the opId record component.
      Returns:
      the value of the opId record component
    • fromSite

      public String fromSite()
      Returns the value of the fromSite record component.
      Returns:
      the value of the fromSite record component
    • toSite

      public String toSite()
      Returns the value of the toSite record component.
      Returns:
      the value of the toSite record component
    • clientId

      public String clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • bucketName

      public String bucketName()
      Returns the value of the bucketName record component.
      Returns:
      the value of the bucketName record component
    • objectName

      public String objectName()
      Returns the value of the objectName record component.
      Returns:
      the value of the objectName record component
    • size

      public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • hash

      public String hash()
      Returns the value of the hash record component.
      Returns:
      the value of the hash record component
    • action

      public ReplicatorConstants.Action action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component