Package ai.djl.serving.wlm
Class WorkerGroup<I,O>
- java.lang.Object
-
- ai.djl.serving.wlm.WorkerGroup<I,O>
-
public class WorkerGroup<I,O> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureWorkers(int minWorkers, int maxWorkers)Configures minimum and maximum number of workers.ai.djl.DevicegetDevice()Returns the device of the worker group.intgetMaxWorkers()Returns the max number of workers for the model and device.intgetMinWorkers()Returns the min number of workers for the model and device.java.util.List<WorkerThread<I,O>>getWorkers()Returns a list of workers.
-
-
-
Method Detail
-
getDevice
public ai.djl.Device getDevice()
Returns the device of the worker group.- Returns:
- the device of the worker group
-
getWorkers
public java.util.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 workersmaxWorkers- the maximum number of workers
-
-