Class ThreadedRunnable<E>
- java.lang.Object
-
- org.hortonmachine.gears.libs.modules.ThreadedRunnable<E>
-
public class ThreadedRunnable<E> extends Object
Multithreading util class.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description ThreadedRunnable(int numThreads, IHMProgressMonitor pm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToQueue(E item)voidexecuteRunnable(Runnable runner)ConcurrentLinkedQueue<E>getQueue()voidsetWorkLoad(String task, int workLoad)voidwaitAndClose()voidworked(int process)
-
-
-
Constructor Detail
-
ThreadedRunnable
public ThreadedRunnable(int numThreads, IHMProgressMonitor pm)
-
-
Method Detail
-
executeRunnable
public void executeRunnable(Runnable runner)
-
waitAndClose
public void waitAndClose()
-
addToQueue
public void addToQueue(E item)
-
getQueue
public ConcurrentLinkedQueue<E> getQueue()
-
setWorkLoad
public void setWorkLoad(String task, int workLoad)
-
worked
public void worked(int process)
-
-