Record Class JobClusterView

java.lang.Object
java.lang.Record
io.github.jchejarla.springbatch.clustering.query.JobClusterView
Record Components:
jobExecutionId - the Spring Batch job execution id
masterNode - the node coordinating (mastering) this job
coordinationStatus - the coordination status
partitionCount - total number of partitions
statusCounts - count of partitions by status (PENDING / CLAIMED / COMPLETED / FAILED)
partitions - per-partition placement and status

public record JobClusterView(long jobExecutionId, String masterNode, String coordinationStatus, int partitionCount, Map<String,Long> statusCounts, List<PartitionView> partitions) extends Record
A read-only, job-centric view of how a job is distributed across the cluster: which node masters it, how many partitions it has, the count of partitions in each status, and where each partition is running.
  • Constructor Details

    • JobClusterView

      public JobClusterView(long jobExecutionId, String masterNode, String coordinationStatus, int partitionCount, Map<String,Long> statusCounts, List<PartitionView> partitions)
      Creates an instance of a JobClusterView record class.
      Parameters:
      jobExecutionId - the value for the jobExecutionId record component
      masterNode - the value for the masterNode record component
      coordinationStatus - the value for the coordinationStatus record component
      partitionCount - the value for the partitionCount record component
      statusCounts - the value for the statusCounts record component
      partitions - the value for the partitions 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 '=='.
      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.
    • jobExecutionId

      public long jobExecutionId()
      Returns the value of the jobExecutionId record component.
      Returns:
      the value of the jobExecutionId record component
    • masterNode

      public String masterNode()
      Returns the value of the masterNode record component.
      Returns:
      the value of the masterNode record component
    • coordinationStatus

      public String coordinationStatus()
      Returns the value of the coordinationStatus record component.
      Returns:
      the value of the coordinationStatus record component
    • partitionCount

      public int partitionCount()
      Returns the value of the partitionCount record component.
      Returns:
      the value of the partitionCount record component
    • statusCounts

      public Map<String,Long> statusCounts()
      Returns the value of the statusCounts record component.
      Returns:
      the value of the statusCounts record component
    • partitions

      public List<PartitionView> partitions()
      Returns the value of the partitions record component.
      Returns:
      the value of the partitions record component