public static class WorkerThread.Builder
extends java.lang.Object
WorkerThread.| Modifier and Type | Method and Description |
|---|---|
WorkerThread |
build()
Builds the
WorkerThread with the provided data. |
WorkerThread.Builder |
optAggregator(ai.djl.serving.wlm.BatchAggregator aggregator)
Sets a
BatchAggregator which overrides the instantiated default BatchAggregator. |
WorkerThread.Builder |
optFixPoolThread(boolean fixPoolThread)
Sets if the workerThread should be part of the fixed pool.
|
protected void |
preBuildProcessing() |
protected WorkerThread.Builder |
self()
Returns self reference to this builder.
|
WorkerThread.Builder |
setJobQueue(java.util.concurrent.LinkedBlockingDeque<WorkerJob> jobQueue)
Sets the jobQueue used to poll for new jobs.
|
WorkerThread.Builder |
setModel(ModelInfo model)
Sets the
ModelInfo the thread will be responsible for. |
protected void |
validate() |
protected WorkerThread.Builder self()
protected void preBuildProcessing()
protected void validate()
public WorkerThread build()
WorkerThread with the provided data.WorkerThreadpublic WorkerThread.Builder setModel(ModelInfo model)
ModelInfo the thread will be responsible for.model - the model to setpublic WorkerThread.Builder optAggregator(ai.djl.serving.wlm.BatchAggregator aggregator)
BatchAggregator which overrides the instantiated default BatchAggregator.aggregator - the BatchAggregator to setpublic WorkerThread.Builder setJobQueue(java.util.concurrent.LinkedBlockingDeque<WorkerJob> jobQueue)
optAggregator(BatchAggregator)jobQueue - the jobQueue to setpublic WorkerThread.Builder optFixPoolThread(boolean fixPoolThread)
fixPoolThread - the fixPoolThread to set