Package ai.djl.serving.wlm.util
Class WlmConfigManager
- java.lang.Object
-
- ai.djl.serving.wlm.util.WlmConfigManager
-
public final class WlmConfigManager extends java.lang.ObjectThis manages some configurations used by theWorkLoadManager.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBatchSize()Returns the default batchSize for workers.intgetDefaultMaxWorkers(ai.djl.Model model)Returns the default maximum number of workers for a new registered model.intgetDefaultMinWorkers(ai.djl.Model model)Returns the default minimum number of workers for a new registered model.static WlmConfigManagergetInstance()Returns the singletonConfigManagerinstance.intgetJobQueueSize()Returns the default job queue size.intgetMaxBatchDelay()Returns the default maxBatchDelay for the working queue.intgetMaxIdleTime()Returns the default max idle time for workers.booleanisDebug()Returns if debug is enabled.voidsetBatchSize(int batchSize)Sets the default batchSize for workers.voidsetJobQueueSize(int jobQueueSize)Sets the default job queue size.voidsetMaxBatchDelay(int maxBatchDelay)Sets the default maxBatchDelay for the working queue.voidsetMaxIdleTime(int maxIdleTime)Sets the default max idle time for workers.
-
-
-
Method Detail
-
getInstance
public static WlmConfigManager getInstance()
Returns the singletonConfigManagerinstance.- Returns:
- the singleton
ConfigManagerinstance
-
isDebug
public boolean isDebug()
Returns if debug is enabled.- Returns:
trueif debug is enabled
-
getJobQueueSize
public int getJobQueueSize()
Returns the default job queue size.- Returns:
- the default job queue size
-
setJobQueueSize
public void setJobQueueSize(int jobQueueSize)
Sets the default job queue size.- Parameters:
jobQueueSize- the new default job queue size
-
getMaxIdleTime
public int getMaxIdleTime()
Returns the default max idle time for workers.- Returns:
- the default max idle time
-
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime)
Sets the default max idle time for workers.- Parameters:
maxIdleTime- the new default max idle time
-
getBatchSize
public int getBatchSize()
Returns the default batchSize for workers.- Returns:
- the default max idle time
-
setBatchSize
public void setBatchSize(int batchSize)
Sets the default batchSize for workers.- Parameters:
batchSize- the new default batchSize
-
getMaxBatchDelay
public int getMaxBatchDelay()
Returns the default maxBatchDelay for the working queue.- Returns:
- the default max batch delay
-
setMaxBatchDelay
public void setMaxBatchDelay(int maxBatchDelay)
Sets the default maxBatchDelay for the working queue.- Parameters:
maxBatchDelay- the new default maxBatchDelay
-
getDefaultMinWorkers
public int getDefaultMinWorkers(ai.djl.Model model)
Returns the default minimum number of workers for a new registered model.- Parameters:
model- the loadedModel- Returns:
- the calculated minimum number of workers for a new registered model
-
getDefaultMaxWorkers
public int getDefaultMaxWorkers(ai.djl.Model model)
Returns the default maximum number of workers for a new registered model.- Parameters:
model- the loadedModel- Returns:
- the default number of workers for a new registered model
-
-