org.ourgrid.test.threadServices
Class ThreadPoolServices

java.lang.Object
  extended by org.ourgrid.test.threadServices.ThreadPoolServices
Direct Known Subclasses:
ExtendedThreadPoolServices

public class ThreadPoolServices
extends java.lang.Object

This class will control runnables executions at OurGrid. It will receive and control all pooled executions call and will wait until all runnables are finished.


Field Summary
static java.util.Set<java.lang.Object> runnablesAtThreadPool
          Set that controls the runnables that are at a thread pool.
 
Constructor Summary
ThreadPoolServices()
           
 
Method Summary
static void includePooledExecution(java.lang.Object run)
          Method to add a runnable at the control set.
static void isCompiledWithAspects()
          Throws a RuntimeException indicating that the classes that use this package should be compiled using AspectJ compiler.
static void removePooledExecution(java.lang.Object run)
          Method to remove a runnable at the control set.
static void waitUntilWorkIsDone()
          This method simply waits the current runnables finish their jobs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runnablesAtThreadPool

public static java.util.Set<java.lang.Object> runnablesAtThreadPool
Set that controls the runnables that are at a thread pool.

Constructor Detail

ThreadPoolServices

public ThreadPoolServices()
Method Detail

includePooledExecution

public static void includePooledExecution(java.lang.Object run)
Method to add a runnable at the control set.


removePooledExecution

public static void removePooledExecution(java.lang.Object run)
Method to remove a runnable at the control set.


waitUntilWorkIsDone

public static void waitUntilWorkIsDone()
This method simply waits the current runnables finish their jobs.


isCompiledWithAspects

public static void isCompiledWithAspects()
Throws a RuntimeException indicating that the classes that use this package should be compiled using AspectJ compiler.