uk.ac.essex.ia.opview.runtime
Class NodeThreadPool

java.lang.Object
  extended by 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


Constructor Summary
NodeThreadPool()
           
 
Method Summary
 void execute(java.lang.Runnable command)
          Executes the given task in a pooled thread
 void shutdown()
           
 java.util.List<java.lang.Runnable> shutdownNow()
           
 java.util.concurrent.Future<ExecutionResult> submit(java.util.concurrent.Callable<ExecutionResult> task)
          Submit a task and wait
 java.util.concurrent.Future<ExecutionResult> take()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeThreadPool

public NodeThreadPool()
Method Detail

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