[52] | 1 | package geniusweb.protocol.tournament.allpermutationslearn;
|
---|
| 2 |
|
---|
| 3 | import geniusweb.protocol.tournament.TournamentState;
|
---|
| 4 | import geniusweb.protocol.tournament.allpermutations.AllPermutationsProtocol;
|
---|
| 5 | import geniusweb.protocol.tournament.allpermutations.AllPermutationsState;
|
---|
| 6 | import geniusweb.references.ProtocolRef;
|
---|
| 7 | import tudelft.utilities.logging.Reporter;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | * This protocol creates sequentially all permutations of available parties and
|
---|
| 11 | * profiles, See {@link AllPermutationsLearnSettings} for details. Only 1
|
---|
| 12 | * session is run at a time because managing multiple sessions is more complex
|
---|
| 13 | * to manage in the {@link TournamentState}
|
---|
| 14 | *
|
---|
| 15 | */
|
---|
| 16 | public class AllPermutationsLearnProtocol extends AllPermutationsProtocol {
|
---|
| 17 | private static final ProtocolRef APPLearn = new ProtocolRef("APPLearn");
|
---|
| 18 |
|
---|
| 19 | /**
|
---|
| 20 | *
|
---|
| 21 | * @param state the {@link AllPermutationsState}
|
---|
| 22 | * @param logger used for all logging, about the tournament, and the created
|
---|
| 23 | * the session and protocols.
|
---|
| 24 | */
|
---|
| 25 | public AllPermutationsLearnProtocol(AllPermutationsLearnState state,
|
---|
| 26 | Reporter logger) {
|
---|
| 27 | super(state, logger);
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | @Override
|
---|
| 31 | public String getDescription() {
|
---|
| 32 | return "Runs all possible permutations of provided parties and profiles, "
|
---|
| 33 | + "with the given number of parties per session. Sessions run one at a time. "
|
---|
| 34 | + "In each session, all parties receive FileLocations in the 'negotiationdata' parameter."
|
---|
| 35 | + "If reuseParties is set, then a party can occur more than 1 time in each session. "
|
---|
| 36 | + "The sessionSettings determine the baseline settings for each session, eg the deadline "
|
---|
| 37 | + "and the protocol to be used. The AllPermutationsProtocol supports all basic SessionProtocols. "
|
---|
| 38 | + "parties and protocols already available in the settings will participate in every session. "
|
---|
| 39 | + "After all sessions have been run, a Learn session is done where all parties receive their"
|
---|
| 40 | + "previously stored FileLocations again.";
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | @Override
|
---|
| 44 | public ProtocolRef getRef() {
|
---|
| 45 | return APPLearn;
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | }
|
---|