T
- Options typepublic interface ParallelClientManager<T extends Options> extends Callable<Object>
Modifier and Type | Method and Description |
---|---|
int |
completeRun()
Method that will be called by parallel clients to indicate they have
completed a run and to obtain what run completion number it is
|
ParallelClient<T> |
createClient(int id)
Creates a new parallel client
|
T |
getOptions()
Gets the options
|
Runner<T> |
getRunner()
Gets the runner
|
void |
halt()
Method called by parallel clients to tell the manager that they
encountered a halting condition and thus all clients should halt
|
boolean |
hasFinished()
Returns whether the parallel clients have finished all necessary runs
|
boolean |
isReady()
Gets whether the manager is ready for clients to begin executing
|
boolean |
shouldRun()
Method that will be called by parallel clients to determine if they
should continue to run, calls to this are thread safe
|
boolean |
startRun()
Method that will be called by parallel clients to indicate they have
started a new run
|
boolean shouldRun()
boolean startRun()
A boolean is returned indicating whether the client should actually go
ahead with the run, this is to help avoid race conditions where multiple
threads check shouldRun()
to see if they should proceed and then
attempt to start more runs than actually necessary.
int completeRun()
boolean hasFinished()
void halt()
boolean isReady()
T getOptions()
ParallelClient<T> createClient(int id)
id
- Client IDCopyright © 2015. All rights reserved.