|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.ut2004.tournament.match.UT2004MatchExecutor<MATCH,RESULT>
MATCH - RESULT - must be of the same type that the MATCH is producing via UT2004Match.execute().public class UT2004MatchExecutor<MATCH extends UT2004Match,RESULT extends UT2004MatchResult>
UT2004Match executor that will execute one instance of match a time == NO PARALELIZATION HERE!
Please note that executing more than one match on the same UT2004 instance is not considered to be safe because:
If you seek parallelization, consider this:
ThreadPoolExecutor, note that this class is implementing Callable so it is easy to create FutureTask out of it and submit
the FutureTask into ThreadPoolExecutor.execute(Runnable) and wait for results via FutureTask.get().
| Constructor Summary | |
|---|---|
UT2004MatchExecutor(MATCH[] matches,
Logger log)
|
|
| Method Summary | |
|---|---|
Map<cz.cuni.amis.utils.token.IToken,RESULT> |
call()
|
Map<cz.cuni.amis.utils.token.IToken,Throwable> |
getExceptions()
If some match fails, the exception reported is stored within this map. |
Map<cz.cuni.amis.utils.token.IToken,RESULT> |
getResults()
This map holds the results of respective matches. |
void |
run()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UT2004MatchExecutor(MATCH[] matches,
Logger log)
| Method Detail |
|---|
public Map<cz.cuni.amis.utils.token.IToken,RESULT> getResults()
public Map<cz.cuni.amis.utils.token.IToken,Throwable> getExceptions()
public Map<cz.cuni.amis.utils.token.IToken,RESULT> call()
throws Exception
call in interface Callable<Map<cz.cuni.amis.utils.token.IToken,RESULT extends UT2004MatchResult>>Exceptionpublic void run()
run in interface Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||