Package ai.djl.serving.wlm
Class WorkerPoolConfig.ThreadConfig<I,O>
java.lang.Object
ai.djl.serving.wlm.WorkerPoolConfig.ThreadConfig<I,O>
- Type Parameters:
I- the input typeO- the output type
- Direct Known Subclasses:
ModelInfo.ModelThread
- Enclosing class:
- WorkerPoolConfig<I,
O>
The part of the
WorkerPoolConfig for an individual WorkerThread.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclose()Closes the thread type and frees any resources.Gets the configuration jobs for the worker.abstract voidRuns the work on theWorkerThreadand stores in the job.
-
Field Details
-
configJobs
-
-
Constructor Details
-
ThreadConfig
protected ThreadConfig(ai.djl.Device device)
-
-
Method Details
-
run
Runs the work on theWorkerThreadand stores in the job.- Parameters:
inputs- the work input- Throws:
ai.djl.translate.TranslateException- if it failed to compute
-
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.
-