Class WorkerPoolConfig.ThreadConfig<I,​O>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.concurrent.LinkedBlockingDeque<Job<I,​O>> configJobs  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ThreadConfig​(ai.djl.Device device)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void close()
      Closes the thread type and frees any resources.
      java.util.concurrent.LinkedBlockingDeque<Job<I,​O>> getConfigJobs()
      Gets the configuration jobs for the worker.
      abstract void run​(java.util.List<Job<I,​O>> inputs)
      Runs the work on the WorkerThread and stores in the job.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • configJobs

        protected java.util.concurrent.LinkedBlockingDeque<Job<I,​O>> configJobs
    • Constructor Detail

      • ThreadConfig

        protected ThreadConfig​(ai.djl.Device device)
    • Method Detail

      • run

        public abstract void run​(java.util.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 java.util.concurrent.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.