Record Class WanPublisher.WanBatch

java.lang.Object
java.lang.Record
com.loomcache.server.wan.WanPublisher.WanBatch
Enclosing class:
WanPublisher

public static record WanPublisher.WanBatch(@NonNull String sourceClusterId, @NonNull String targetClusterId, @NonNull String targetEndpoint, byte @NonNull [] payload, int eventCount, boolean compressed, long requiredAckSequence) extends Record
Since:
2.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    WanBatch(@NonNull String sourceClusterId, @NonNull String targetClusterId, @NonNull String targetEndpoint, byte @NonNull [] payload, int eventCount, boolean compressed, long requiredAckSequence)
    Creates an instance of a WanBatch record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the compressed record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the eventCount record component.
    final int
    Returns a hash code value for this object.
    byte @NonNull []
    Returns the value of the payload record component.
    long
    Returns the value of the requiredAckSequence record component.
    @NonNull String
    Returns the value of the sourceClusterId record component.
    @NonNull String
    Returns the value of the targetClusterId record component.
    @NonNull String
    Returns the value of the targetEndpoint record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • WanBatch

      public WanBatch(@NonNull String sourceClusterId, @NonNull String targetClusterId, @NonNull String targetEndpoint, byte @NonNull [] payload, int eventCount, boolean compressed, long requiredAckSequence)
      Creates an instance of a WanBatch record class.
      Parameters:
      sourceClusterId - the value for the sourceClusterId record component
      targetClusterId - the value for the targetClusterId record component
      targetEndpoint - the value for the targetEndpoint record component
      payload - the value for the payload record component
      eventCount - the value for the eventCount record component
      compressed - the value for the compressed record component
      requiredAckSequence - the value for the requiredAckSequence record component
  • Method Details

    • payload

      public byte @NonNull [] payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component
    • 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 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.
    • sourceClusterId

      public @NonNull String sourceClusterId()
      Returns the value of the sourceClusterId record component.
      Returns:
      the value of the sourceClusterId record component
    • targetClusterId

      public @NonNull String targetClusterId()
      Returns the value of the targetClusterId record component.
      Returns:
      the value of the targetClusterId record component
    • targetEndpoint

      public @NonNull String targetEndpoint()
      Returns the value of the targetEndpoint record component.
      Returns:
      the value of the targetEndpoint record component
    • eventCount

      public int eventCount()
      Returns the value of the eventCount record component.
      Returns:
      the value of the eventCount record component
    • compressed

      public boolean compressed()
      Returns the value of the compressed record component.
      Returns:
      the value of the compressed record component
    • requiredAckSequence

      public long requiredAckSequence()
      Returns the value of the requiredAckSequence record component.
      Returns:
      the value of the requiredAckSequence record component