Class WorkerSummary

java.lang.Object
co.yellowdog.platform.model.WorkerSummary
All Implemented Interfaces:
Serializable

public class WorkerSummary extends Object implements Serializable
A summary of a group of workers.
See Also:
  • Constructor Details

    • WorkerSummary

      public WorkerSummary()
    • WorkerSummary

      public WorkerSummary(Map<WorkerStatus,Long> statusCounts, int allWorkerClaimsCount, int claimedWorkerCount, Instant lastClaimedTime, Instant lastReleasedTime, Instant lastUpdatedTime)
      Creates a new WorkerSummary instance.
      Parameters:
      statusCounts - The number of workers in each status.
      allWorkerClaimsCount - The number of claims across all workers in this worker pool.
      claimedWorkerCount - The number of workers that are claimed.
      lastClaimedTime - The last time one of these workers was claimed.
      lastReleasedTime - The last time one of these workers was released.
      lastUpdatedTime - The last time this summary was updated.
  • Method Details

    • builder

      public static WorkerSummary.Builder builder()
    • getStatusCounts

      public Map<WorkerStatus,Long> getStatusCounts()
      The number of workers in each status.
    • getAllWorkerClaimsCount

      public int getAllWorkerClaimsCount()
      The number of claims across all workers in this worker pool.
    • getClaimedWorkerCount

      public int getClaimedWorkerCount()
      The number of workers that are claimed.
    • getLastClaimedTime

      public Instant getLastClaimedTime()
      The last time one of these workers was claimed.
    • getLastReleasedTime

      public Instant getLastReleasedTime()
      The last time one of these workers was released.
    • getLastUpdatedTime

      public Instant getLastUpdatedTime()
      The last time this summary was updated.
    • setStatusCounts

      public void setStatusCounts(Map<WorkerStatus,Long> statusCounts)
      The number of workers in each status.
    • setAllWorkerClaimsCount

      public void setAllWorkerClaimsCount(int allWorkerClaimsCount)
      The number of claims across all workers in this worker pool.
    • setClaimedWorkerCount

      public void setClaimedWorkerCount(int claimedWorkerCount)
      The number of workers that are claimed.
    • setLastClaimedTime

      public void setLastClaimedTime(Instant lastClaimedTime)
      The last time one of these workers was claimed.
    • setLastReleasedTime

      public void setLastReleasedTime(Instant lastReleasedTime)
      The last time one of these workers was released.
    • setLastUpdatedTime

      public void setLastUpdatedTime(Instant lastUpdatedTime)
      The last time this summary was updated.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object