Class WorkerGroup<I,O>

java.lang.Object
ai.djl.serving.wlm.WorkerGroup<I,O>

public class WorkerGroup<I,O> extends Object
The WorkerGroup manages the WorkerPool for a particular Device.
  • Method Details

    • getDevice

      public ai.djl.Device getDevice()
      Returns the device of the worker group.
      Returns:
      the device of the worker group
    • getWorkers

      public List<WorkerThread<I,O>> getWorkers()
      Returns a list of workers.
      Returns:
      a list of workers
    • getMinWorkers

      public int getMinWorkers()
      Returns the min number of workers for the model and device.
      Returns:
      the min number of workers for the model and device
    • getMaxWorkers

      public int getMaxWorkers()
      Returns the max number of workers for the model and device.
      Returns:
      the max number of workers for the model and device
    • configureWorkers

      public void configureWorkers(int minWorkers, int maxWorkers)
      Configures minimum and maximum number of workers.
      Parameters:
      minWorkers - the minimum number of workers
      maxWorkers - the maximum number of workers