Package ai.djl.serving.http
Class DescribeWorkflowResponse.Group
java.lang.Object
ai.djl.serving.http.DescribeWorkflowResponse.Group
- Enclosing class:
- DescribeWorkflowResponse
A class represents worker group.
-
Constructor Summary
ConstructorDescriptionGroup
(ai.djl.Device device, int minWorkers, int maxWorkers) Constructs a new instance ofGroup
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addWorker
(int id, long startTime, boolean isRunning) Adds worker to the worker list.ai.djl.Device
Returns the worker device.int
Returns the maximum number of workers.int
Returns the minimum number of workers.Returns a list of workers.
-
Constructor Details
-
Group
public Group(ai.djl.Device device, int minWorkers, int maxWorkers) Constructs a new instance ofGroup
.- Parameters:
device
- the deviceminWorkers
- the minimum number of workersmaxWorkers
- 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 IDstartTime
- the worker's start timeisRunning
-true
if worker is running
-
getWorkers
Returns a list of workers.- Returns:
- a list of workers
-