uk.ac.essex.ia.opview.runtime
Class NodeThreadPool
java.lang.Object
uk.ac.essex.ia.opview.runtime.NodeThreadPool
public class NodeThreadPool
- extends java.lang.Object
You should have received a copy of GNU public license with this code.
If not please visit this site
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeThreadPool
public NodeThreadPool()
shutdown
public void shutdown()
shutdownNow
public java.util.List<java.lang.Runnable> shutdownNow()
execute
public void execute(java.lang.Runnable command)
- Executes the given task in a pooled thread
- Parameters:
command
-
submit
public java.util.concurrent.Future<ExecutionResult> submit(java.util.concurrent.Callable<ExecutionResult> task)
- Submit a task and wait
- Parameters:
task
-
- Returns:
- Future - The future object containing the result
take
public java.util.concurrent.Future<ExecutionResult> take()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException