Package ai.djl.serving.wlm.util
Class WlmConfigManager
java.lang.Object
ai.djl.serving.wlm.util.WlmConfigManager
This manages some configurations used by the
WorkLoadManager
.-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the default batchSize for workers.static WlmConfigManager
Returns the singletonConfigManager
instance.int
Returns the default job queue size.Returns the devices the model will be loaded on at startup.int
Returns the default max batch delay in milliseconds for the working queue.int
Returns the default max idle time for workers.int
Returns the default reserved memory in MB.boolean
isDebug()
Returns if debug is enabled.void
setBatchSize
(int batchSize) Sets the default batchSize for workers.void
setJobQueueSize
(int jobQueueSize) Sets the default job queue size.void
setLoadOnDevices
(String loadOnDevices) Sets the devices the model will be loaded on at startup.void
setMaxBatchDelayMillis
(int maxBatchDelayMillis) Sets the default max batch delay in milliseconds for the working queue.void
setMaxIdleSeconds
(int maxIdleSeconds) Sets the default max idle time in seconds for workers.void
setReservedMemoryMb
(int reservedMemoryMb) Sets the reserved memory in MB.
-
Method Details
-
getInstance
Returns the singletonConfigManager
instance.- Returns:
- the singleton
ConfigManager
instance
-
isDebug
public boolean isDebug()Returns if debug is enabled.- Returns:
true
if 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
Returns the devices the model will be loaded on at startup.- Returns:
- the devices the model will be loaded on at startup
-
setLoadOnDevices
Sets the devices the model will be loaded on at startup.- Parameters:
loadOnDevices
- thes the default model will be loaded on at startup
-