Class ConsensusBuilder

java.lang.Object
com.tnsai.coordination.voting.ConsensusBuilder

public class ConsensusBuilder extends Object
Fluent builder that orchestrates a voting session among agents.

Example usage:


 VotingResult result = ConsensusBuilder.create()
     .topic("Which database to use?")
     .options("PostgreSQL", "MySQL", "MongoDB")
     .among(List.of(agent1, agent2, agent3))
     .method(VotingMethod.MAJORITY)
     .timeout(Duration.ofSeconds(30))
     .quorum(2)
     .vote();