Record Class JobClusterView
java.lang.Object
java.lang.Record
io.github.jchejarla.springbatch.clustering.query.JobClusterView
- Record Components:
jobExecutionId- the Spring Batch job execution idmasterNode- the node coordinating (mastering) this jobcoordinationStatus- the coordination statuspartitionCount- total number of partitionsstatusCounts- 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 Summary
ConstructorsConstructorDescriptionJobClusterView(long jobExecutionId, String masterNode, String coordinationStatus, int partitionCount, Map<String, Long> statusCounts, List<PartitionView> partitions) Creates an instance of aJobClusterViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecoordinationStatusrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thejobExecutionIdrecord component.Returns the value of themasterNoderecord component.intReturns the value of thepartitionCountrecord component.Returns the value of thepartitionsrecord component.Returns the value of thestatusCountsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JobClusterView
public JobClusterView(long jobExecutionId, String masterNode, String coordinationStatus, int partitionCount, Map<String, Long> statusCounts, List<PartitionView> partitions) Creates an instance of aJobClusterViewrecord class.- Parameters:
jobExecutionId- the value for thejobExecutionIdrecord componentmasterNode- the value for themasterNoderecord componentcoordinationStatus- the value for thecoordinationStatusrecord componentpartitionCount- the value for thepartitionCountrecord componentstatusCounts- the value for thestatusCountsrecord componentpartitions- the value for thepartitionsrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
jobExecutionId
public long jobExecutionId()Returns the value of thejobExecutionIdrecord component.- Returns:
- the value of the
jobExecutionIdrecord component
-
masterNode
Returns the value of themasterNoderecord component.- Returns:
- the value of the
masterNoderecord component
-
coordinationStatus
Returns the value of thecoordinationStatusrecord component.- Returns:
- the value of the
coordinationStatusrecord component
-
partitionCount
public int partitionCount()Returns the value of thepartitionCountrecord component.- Returns:
- the value of the
partitionCountrecord component
-
statusCounts
Returns the value of thestatusCountsrecord component.- Returns:
- the value of the
statusCountsrecord component
-
partitions
Returns the value of thepartitionsrecord component.- Returns:
- the value of the
partitionsrecord component
-