|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.toolforge.karma.core.vc.threads.ParallelRunner
The ParallelRunner handles parallel RunnerThread
s. This concept should be used when parallel read
actions on version control repositories are possible to speed up the process of performing commands for
each module in a manifest.
Field Summary | |
(package private) org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
ParallelRunner(Manifest manifest,
java.lang.Class threadClass)
Initializes this ParallelRunner with the correct Manifest . |
Method Summary | |
void |
execute()
Starts all threads, and processes the results. |
void |
execute(int blockSize,
long delayInMilliseconds)
Starts all threads, and processes the results. |
void |
execute(long delayInMilliseconds)
Starts all threads, and processes the results. |
java.util.Map |
retrieveResults()
Returns a map of ModuleStatus objects, each accessible by the the corresponding
Module instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
org.apache.commons.logging.Log logger
Constructor Detail |
public ParallelRunner(Manifest manifest, java.lang.Class threadClass)
ParallelRunner
with the correct Manifest
. Call execute()
or
execute(int, long)
to start all threads.
manifest
- The manifest.threadClass
- A Class instance, extending Thread
.Method Detail |
public void execute(long delayInMilliseconds)
retrieveResults()
.
delayInMilliseconds
- The delay in milliseconds between the start of each thread.public void execute()
retrieveResults()
. Note
that no restriction is imposed on the amount of threads, and they are started as soon as possible.
execute(long)
,
execute(int, long)
public void execute(int blockSize, long delayInMilliseconds)
retrieveResults()
.
blockSize
- Determines the amount of threads that will be started in one block, with a delay of
delayInMilliseconds
. If all threads should be started as one block, a
negative blockSize
should be provided. When a positive blocksize is
provided, a default delay of 1000 milliseconds is used between blocks. Note
this feature is currently ignored.delayInMilliseconds
- The delay in milliseconds between threads in a block (or all threads if
blockSize
is negative.public java.util.Map retrieveResults()
ModuleStatus
objects, each accessible by the the corresponding
Module
instance.
ModuleStatus
objects.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |