-
- All Superinterfaces:
Runnable
- All Known Subinterfaces:
SchedulerTask
- All Known Implementing Classes:
AbstractTransportServerThread
,DefaultTcpTransportMapping.ServerThread
,DefaultThreadFactory.WorkerThread
,DefaultUdpTransportMapping.ListenThread
public interface WorkerTask extends Runnable
This models aWorkerTask
instance that would be executed by aWorkerPool
upon submission.- Since:
- 1.9
- Version:
- 1.9
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
interrupt()
Interrupts this task.void
join()
Waits until this task has been finished.void
terminate()
TheWorkerPool
might call this method to hint the activeWorkTask
instance to complete execution as soon as possible.
-
-
-
Method Detail
-
terminate
void terminate()
TheWorkerPool
might call this method to hint the activeWorkTask
instance to complete execution as soon as possible.
-
join
void join() throws InterruptedException
Waits until this task has been finished.- Throws:
InterruptedException
- if the join has been interrupted by another thread.
-
interrupt
void interrupt()
Interrupts this task.- See Also:
Thread.interrupt()
-
-