-
- All Superinterfaces:
java.lang.Runnable
- All Known Subinterfaces:
SchedulerTask
- All Known Implementing Classes:
AbstractTcpServerThread,DefaultTcpTransportMapping.ServerThread,DefaultThreadFactory.WorkerThread,DefaultUdpTransportMapping.ListenThread
public interface WorkerTask extends java.lang.RunnableThis models aWorkerTaskinstance that would be executed by aWorkerPoolupon submission.- Since:
- 1.9
- Version:
- 1.9
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinterrupt()Interrupts this task.voidjoin()Waits until this task has been finished.voidterminate()TheWorkerPoolmight call this method to hint the activeWorkTaskinstance to complete execution as soon as possible.
-
-
-
Method Detail
-
terminate
void terminate()
TheWorkerPoolmight call this method to hint the activeWorkTaskinstance to complete execution as soon as possible.
-
join
void join() throws java.lang.InterruptedException
Waits until this task has been finished.- Throws:
java.lang.InterruptedException- if the join has been interrupted by another thread.
-
interrupt
void interrupt()
Interrupts this task.- See Also:
Thread.interrupt()
-
-