Class WorkerPoolConfig.ThreadConfig<I,O>

java.lang.Object
ai.djl.serving.wlm.WorkerPoolConfig.ThreadConfig<I,O>
Type Parameters:
I - the input type
O - the output type
Direct Known Subclasses:
ModelInfo.ModelThread
Enclosing class:
WorkerPoolConfig<I,O>

public abstract static class WorkerPoolConfig.ThreadConfig<I,O> extends Object
The part of the WorkerPoolConfig for an individual WorkerThread.
  • Field Details

  • Constructor Details

    • ThreadConfig

      protected ThreadConfig(ai.djl.Device device)
  • Method Details

    • run

      public abstract void run(List<Job<I,O>> inputs) throws ai.djl.translate.TranslateException
      Runs the work on the WorkerThread and stores in the job.
      Parameters:
      inputs - the work input
      Throws:
      ai.djl.translate.TranslateException - if it failed to compute
    • getConfigJobs

      public LinkedBlockingDeque<Job<I,O>> getConfigJobs()
      Gets the configuration jobs for the worker.
      Returns:
      the configuration jobs for the worker
    • close

      public abstract void close()
      Closes the thread type and frees any resources.