cz.cuni.amis.pogamut.ut2004.tournament.deathmatch
Class UT2004DeathMatchTournament

Package class diagram package UT2004DeathMatchTournament
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.tournament.deathmatch.UT2004DeathMatchTournament
All Implemented Interfaces:
Runnable, Callable<Map<cz.cuni.amis.utils.token.IToken,UT2004DeathMatchResult>>

public class UT2004DeathMatchTournament
extends Object
implements Callable<Map<cz.cuni.amis.utils.token.IToken,UT2004DeathMatchResult>>, Runnable

Class that performs the tournament as described by UT2004DeathMatchTournamentConfig.

THREAD-UNSAFE!

Author:
Jimmy

Constructor Summary
UT2004DeathMatchTournament(UT2004DeathMatchTournamentConfig config, cz.cuni.amis.pogamut.base.utils.logging.LogCategory log)
           
 
Method Summary
 Map<cz.cuni.amis.utils.token.IToken,UT2004DeathMatchResult> call()
           
 void cleanUp()
          WARNING: this method will delete the whole directory where results are stored!
 Map<cz.cuni.amis.utils.token.IToken,Throwable> getExceptions()
          If some match fails, the exception reported is stored within this map.
 File getOutputPath()
          Returns directory where all tournament matches will be output.
 Map<cz.cuni.amis.utils.token.IToken,UT2004DeathMatchResult> 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

UT2004DeathMatchTournament

public UT2004DeathMatchTournament(UT2004DeathMatchTournamentConfig config,
                                  cz.cuni.amis.pogamut.base.utils.logging.LogCategory log)
Method Detail

getResults

public Map<cz.cuni.amis.utils.token.IToken,UT2004DeathMatchResult> getResults()
This map holds the results of respective matches. Immutable.

Returns:

getExceptions

public Map<cz.cuni.amis.utils.token.IToken,Throwable> getExceptions()
If some match fails, the exception reported is stored within this map. Immutable.

Returns:

call

public Map<cz.cuni.amis.utils.token.IToken,UT2004DeathMatchResult> call()
                                                                 throws Exception
Specified by:
call in interface Callable<Map<cz.cuni.amis.utils.token.IToken,UT2004DeathMatchResult>>
Throws:
Exception

run

public void run()
Specified by:
run in interface Runnable

cleanUp

public void cleanUp()
WARNING: this method will delete the whole directory where results are stored! IT WILL DELETE IT COMPLETELY! DO NOT USE IT ON A WHIM... be sure you're using separate directories for all matches.


getOutputPath

public File getOutputPath()
Returns directory where all tournament matches will be output.

Returns:


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.