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> extends Object implements Callable<Map<cz.cuni.amis.utils.token.IToken,RESULT>>, Runnable
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 and Description |
|---|
UT2004MatchExecutor(MATCH[] matches,
Logger log) |
| Modifier and Type | Method and Description |
|---|---|
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() |
public Map<cz.cuni.amis.utils.token.IToken,RESULT> getResults()
public Map<cz.cuni.amis.utils.token.IToken,Throwable> getExceptions()
Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.