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.static WlmConfigManagergetInstance()Returns the singletonConfigManagerinstance.intgetJobQueueSize()Returns the default job queue size.java.lang.StringgetLoadOnDevices()Returns the devices the model will be loaded on at startup.intgetMaxBatchDelayMillis()Returns the default max batch delay in milliseconds for the working queue.intgetMaxIdleSeconds()Returns the default max idle time for workers.intgetReservedMemoryMb()Returns the default reserved memory in MB.booleanisDebug()Returns if debug is enabled.voidsetBatchSize(int batchSize)Sets the default batchSize for workers.voidsetJobQueueSize(int jobQueueSize)Sets the default job queue size.voidsetLoadOnDevices(java.lang.String loadOnDevices)Sets the devices the model will be loaded on at startup.voidsetMaxBatchDelayMillis(int maxBatchDelayMillis)Sets the default max batch delay in milliseconds for the working queue.voidsetMaxIdleSeconds(int maxIdleSeconds)Sets the default max idle time in seconds for workers.voidsetReservedMemoryMb(int reservedMemoryMb)Sets the reserved memory in MB.
-
-
-
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
-
getMaxIdleSeconds
public int getMaxIdleSeconds()
Returns the default max idle time for workers.- Returns:
- the default max idle time
-
setMaxIdleSeconds
public void setMaxIdleSeconds(int maxIdleSeconds)
Sets the default max idle time in seconds for workers.- Parameters:
maxIdleSeconds- the new default max idle time in seconds
-
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
-
getMaxBatchDelayMillis
public int getMaxBatchDelayMillis()
Returns the default max batch delay in milliseconds for the working queue.- Returns:
- the default max batch delay in milliseconds
-
setMaxBatchDelayMillis
public void setMaxBatchDelayMillis(int maxBatchDelayMillis)
Sets the default max batch delay in milliseconds for the working queue.- Parameters:
maxBatchDelayMillis- the new default max batch delay in milliseconds
-
getReservedMemoryMb
public int getReservedMemoryMb()
Returns the default reserved memory in MB.- Returns:
- the default reserved memory in MB
-
setReservedMemoryMb
public void setReservedMemoryMb(int reservedMemoryMb)
Sets the reserved memory in MB.- Parameters:
reservedMemoryMb- the reserved memory in MB
-
getLoadOnDevices
public java.lang.String getLoadOnDevices()
Returns the devices the model will be loaded on at startup.- Returns:
- the devices the model will be loaded on at startup
-
setLoadOnDevices
public void setLoadOnDevices(java.lang.String loadOnDevices)
Sets the devices the model will be loaded on at startup.- Parameters:
loadOnDevices- thes the default model will be loaded on at startup
-
-