Package ai.djl.serving.wlm
Class WorkerGroup<I,O>
java.lang.Object
ai.djl.serving.wlm.WorkerGroup<I,O>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configureWorkers
(int minWorkers, int maxWorkers) Configures minimum and maximum number of workers.ai.djl.Device
Returns the device of the worker group.int
Returns the max number of workers for the model and device.int
Returns the min number of workers for the model and device.List<WorkerThread<I,
O>> Returns a list of workers.
-
Method Details
-
getDevice
public ai.djl.Device getDevice()Returns the device of the worker group.- Returns:
- the device of the worker group
-
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 workersmaxWorkers
- the maximum number of workers
-