Class DescribeWorkflowResponse.Group

java.lang.Object
ai.djl.serving.http.DescribeWorkflowResponse.Group
Enclosing class:
DescribeWorkflowResponse

public static final class DescribeWorkflowResponse.Group extends Object
A class represents worker group.
  • Constructor Details

    • Group

      public Group(ai.djl.Device device, int minWorkers, int maxWorkers)
      Constructs a new instance of Group.
      Parameters:
      device - the device
      minWorkers - the minimum number of workers
      maxWorkers - the maximum number of workers
  • Method Details

    • getDevice

      public ai.djl.Device getDevice()
      Returns the worker device.
      Returns:
      the worker device
    • getMinWorkers

      public int getMinWorkers()
      Returns the minimum number of workers.
      Returns:
      the minimum number of workers
    • getMaxWorkers

      public int getMaxWorkers()
      Returns the maximum number of workers.
      Returns:
      the maximum number of workers
    • addWorker

      public void addWorker(int id, long startTime, boolean isRunning)
      Adds worker to the worker list.
      Parameters:
      id - the worker's ID
      startTime - the worker's start time
      isRunning - true if worker is running
    • getWorkers

      public List<DescribeWorkflowResponse.Worker> getWorkers()
      Returns a list of workers.
      Returns:
      a list of workers