Record Class TrackerClaim

java.lang.Object
java.lang.Record
io.fluxzero.common.tracking.TrackerClaim
Record Components:
consumer - consumer name
trackerId - original tracker identity
clientId - original client identity, used for connection liveness
start - inclusive segment boundary
end - exclusive segment boundary
startedAtMillis - time the original batch became active
purgeDelayMillis - configured processing timeout, or null when unbounded
singleTracker - whether ownership excludes every other tracker of this consumer

public record TrackerClaim(String consumer, String trackerId, String clientId, int start, int end, long startedAtMillis, Long purgeDelayMillis, boolean singleTracker) extends Record
An active segment reservation transferred between elected Runtime instances. This contains ownership only: persisted consumer positions remain the progress authority.
  • Constructor Details

    • TrackerClaim

      public TrackerClaim(String consumer, String trackerId, String clientId, int start, int end, long startedAtMillis, Long purgeDelayMillis, boolean singleTracker)
      Creates an instance of a TrackerClaim record class.
      Parameters:
      consumer - the value for the consumer record component
      trackerId - the value for the trackerId record component
      clientId - the value for the clientId record component
      start - the value for the start record component
      end - the value for the end record component
      startedAtMillis - the value for the startedAtMillis record component
      purgeDelayMillis - the value for the purgeDelayMillis record component
      singleTracker - the value for the singleTracker record component
  • Method Details

    • 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.
    • consumer

      public String consumer()
      Returns the value of the consumer record component.
      Returns:
      the value of the consumer record component
    • trackerId

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

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

      public int start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public int end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • startedAtMillis

      public long startedAtMillis()
      Returns the value of the startedAtMillis record component.
      Returns:
      the value of the startedAtMillis record component
    • purgeDelayMillis

      public Long purgeDelayMillis()
      Returns the value of the purgeDelayMillis record component.
      Returns:
      the value of the purgeDelayMillis record component
    • singleTracker

      public boolean singleTracker()
      Returns the value of the singleTracker record component.
      Returns:
      the value of the singleTracker record component