java.lang.Runnable
, WorkerTask
public class DefaultThreadFactory.WorkerThread extends java.lang.Object implements WorkerTask
Constructor | Description |
---|---|
WorkerThread(java.lang.String name,
WorkerTask task) |
Modifier and Type | Method | Description |
---|---|---|
void |
interrupt() |
Interrupts this task.
|
void |
join() |
Waits until this task has been finished.
|
void |
run() |
|
void |
terminate() |
The
WorkerPool might call this method to hint the active
WorkTask instance to complete execution as soon as possible. |
public WorkerThread(java.lang.String name, WorkerTask task)
public void terminate()
WorkerTask
WorkerPool
might call this method to hint the active
WorkTask
instance to complete execution as soon as possible.terminate
in interface WorkerTask
public void join() throws java.lang.InterruptedException
WorkerTask
join
in interface WorkerTask
java.lang.InterruptedException
- if the join has been interrupted by another thread.public void run()
run
in interface java.lang.Runnable
public void interrupt()
WorkerTask
interrupt
in interface WorkerTask
Thread.interrupt()
Copyright © 2018 SNMP4J.org. All rights reserved.