Class WlmConfigManager

java.lang.Object
ai.djl.serving.wlm.util.WlmConfigManager

public final class WlmConfigManager extends Object
This manages some configurations used by the WorkLoadManager.
  • Method Details

    • getInstance

      public static WlmConfigManager getInstance()
      Returns the singleton ConfigManager 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

      public 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(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