public final class WorkerThread
extends java.lang.Object
implements java.lang.Runnable
WorkerThread is the worker managed by the WorkLoadManager.| Modifier and Type | Class and Description |
|---|---|
static class |
WorkerThread.Builder
A Builder to construct a
WorkerThread. |
| Modifier and Type | Method and Description |
|---|---|
static WorkerThread.Builder |
builder()
Creates a builder to build a
WorkerThread. |
int |
getGpuId()
Returns the gpu id used by the thread.
|
long |
getStartTime()
Returns the thread start time.
|
WorkerState |
getState()
Returns the worker state.
|
int |
getWorkerId()
Returns the worker thread ID.
|
boolean |
isFixPoolThread()
check if this worker is instantiate is one of the fix threads of a pool.
|
boolean |
isRunning()
Returns true if the worker thread is running.
|
void |
run() |
void |
shutdown(WorkerState state)
Shuts down the worker thread.
|
public void run()
run in interface java.lang.Runnablepublic int getWorkerId()
public boolean isRunning()
public int getGpuId()
public long getStartTime()
public WorkerState getState()
public void shutdown(WorkerState state)
state - the state to set the thread topublic boolean isFixPoolThread()
public static WorkerThread.Builder builder()
WorkerThread.