Record Class ReplicationManager.ReplicationData

java.lang.Object
java.lang.Record
com.loomcache.server.replication.ReplicationManager.ReplicationData
Enclosing class:
ReplicationManager

public static record ReplicationManager.ReplicationData(String senderId, String operation, String mapName, byte[] keyBytes, byte[] valueBytes, int correlationId) extends Record
Holds parsed replication data from a REPL_SYNC message.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReplicationData(String senderId, String operation, String mapName, byte[] keyBytes, byte[] valueBytes, int correlationId)
    Creates an instance of a ReplicationData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the correlationId record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    byte[]
    Returns the value of the keyBytes record component.
    Returns the value of the mapName record component.
    Returns the value of the operation record component.
    Returns the value of the senderId record component.
    final String
    Returns a string representation of this record class.
    byte[]
    Returns the value of the valueBytes record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ReplicationData

      public ReplicationData(String senderId, String operation, String mapName, byte[] keyBytes, byte[] valueBytes, int correlationId)
      Creates an instance of a ReplicationData record class.
      Parameters:
      senderId - the value for the senderId record component
      operation - the value for the operation record component
      mapName - the value for the mapName record component
      keyBytes - the value for the keyBytes record component
      valueBytes - the value for the valueBytes record component
      correlationId - the value for the correlationId record component
  • Method Details

    • keyBytes

      public byte[] keyBytes()
      Returns the value of the keyBytes record component.
      Returns:
      the value of the keyBytes record component
    • valueBytes

      public byte[] valueBytes()
      Returns the value of the valueBytes record component.
      Returns:
      the value of the valueBytes record component
    • 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 the compare method from their corresponding wrapper classes.
      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
    • 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
    • senderId

      public String senderId()
      Returns the value of the senderId record component.
      Returns:
      the value of the senderId record component
    • operation

      public String operation()
      Returns the value of the operation record component.
      Returns:
      the value of the operation record component
    • mapName

      public String mapName()
      Returns the value of the mapName record component.
      Returns:
      the value of the mapName record component
    • correlationId

      public int correlationId()
      Returns the value of the correlationId record component.
      Returns:
      the value of the correlationId record component