Examples of VoteResult


Examples of edu.vt.rt.hyflow.core.tm.control.vote.VoteResult

      if(!result)
        handler.rollback(txnId);
      handler.release(txnId);
    }
    Logger.debug(txnId + ":sending... " + ((Set<Address>)metadata[NEIGHBOR_TREE_INDEX]));
    VoteResult resultMessage = new VoteResult(txnId, result);
    for(Address neighbor: ((Set<Address>)metadata[NEIGHBOR_TREE_INDEX])){
      Logger.debug(neighbor.toString());
      if(!neighbor.equals(from))
        try {
          resultMessage.send(neighbor);
          Logger.debug(txnId + ": Sent ---------------------------------------->" + neighbor);
        } catch (IOException e) {
          e.printStackTrace();
        }
    }
View Full Code Here

Examples of ise.mace.actions.VoteResult

    }
    // Inform each agent of how their vote went, and the overall group movement
    for (String agent : props.keySet())
    {
      Proposition p = props.get(agent);
      ec.act(new VoteResult(p, voteResult.get(p), change), getId(), authCode);
    }
  }
View Full Code Here

Examples of ise.mace.actions.VoteResult

    }

    @Override
    public Input handle(Action action, String actorID)
    {
      final VoteResult vote = (VoteResult)action;
      final ise.mace.inputs.VoteResult v = new ise.mace.inputs.VoteResult(vote,
              dmodel.time);

      sim.getPlayer(vote.getProposition().getProposer()).enqueueInput(v);
      return null;
    }
View Full Code Here

Examples of ise.mace.inputs.VoteResult

    }

    @Override
    public void handle(Input input)
    {
      final VoteResult in = (VoteResult)input;
      logger.log(Level.FINE, "I, agent {0} got {1} for my {2} proposal.",
              new Object[]
              {
                dm.getName(),
                in.getVotes(), in.getProposition().getType()
              });
      dm.setCurrentHappiness(updateHappinessAfterVotes(in.getProposition(),
              in.getVotes(), in.getOverallMovement()));
      dm.setCurrentLoyalty(updateLoyaltyAfterVotes(in.getProposition(),
              in.getVotes(), in.getOverallMovement()));
      dm.setSocialBelief(updateSocialBeliefAfterVotes(in.getProposition(),
              in.getVotes(), in.getOverallMovement()));
      dm.setEconomicBelief(updateEconomicBeliefAfterVotes(in.getProposition(),
              in.getVotes(), in.getOverallMovement()));
      Map<String, Double> t = updateTrustAfterVotes(in.getProposition(),
              in.getVotes(), in.getOverallMovement());
      if (t == null) return;
      for (String agent : t.keySet())
      {
        dm.setTrust(agent, t.get(agent));
      }
View Full Code Here

Examples of org.jgroups.blocks.VotingAdapter.VoteResult

                    continue;
                case PROCESS_BREAK:
                    return false;
            }

            VoteResult result = (VoteResult) response.getValue();

            totalPositiveVotes += result.getPositiveVotes();
            totalNegativeVotes += result.getNegativeVotes();
        }

        boolean voteResult = (totalNegativeVotes == 0 && totalPositiveVotes > 0);

        if (decree instanceof TwoPhaseVotingAdapter.TwoPhaseWrapper) {
View Full Code Here

Examples of org.jgroups.blocks.VotingAdapter.VoteResult

                    continue;
                case PROCESS_BREAK:
                    return false;
            }

            VoteResult result = (VoteResult) response.getValue();

            totalPositiveVotes += result.getPositiveVotes();
            totalNegativeVotes += result.getNegativeVotes();
        }

        boolean voteResult = (totalNegativeVotes == 0 && totalPositiveVotes > 0);

        if (decree instanceof TwoPhaseVotingAdapter.TwoPhaseWrapper) {
View Full Code Here

Examples of org.jgroups.blocks.VotingAdapter.VoteResult

                    continue;
                case PROCESS_BREAK:
                    return false;
            }

            VoteResult result = (VoteResult) response.getValue();

            totalPositiveVotes += result.getPositiveVotes();
            totalNegativeVotes += result.getNegativeVotes();
        }

        boolean voteResult = (totalNegativeVotes == 0 && totalPositiveVotes > 0);

        if (decree instanceof TwoPhaseVotingAdapter.TwoPhaseWrapper) {
View Full Code Here

Examples of org.jgroups.blocks.VotingAdapter.VoteResult

                    continue;
                case PROCESS_BREAK:
                    return false;
            }

            VoteResult result = (VoteResult) response.getValue();

            totalPositiveVotes += result.getPositiveVotes();
            totalNegativeVotes += result.getNegativeVotes();
        }

        boolean voteResult = (totalNegativeVotes == 0 && totalPositiveVotes > 0);

        if (decree instanceof TwoPhaseVotingAdapter.TwoPhaseWrapper) {
View Full Code Here

Examples of org.jgroups.blocks.VotingAdapter.VoteResult

                    continue;
                case PROCESS_BREAK:
                    return false;
            }

            VoteResult result = (VoteResult) response.getValue();

            totalPositiveVotes += result.getPositiveVotes();
            totalNegativeVotes += result.getNegativeVotes();
        }

        boolean voteResult = (totalNegativeVotes == 0 && totalPositiveVotes > 0);

        if (decree instanceof TwoPhaseVotingAdapter.TwoPhaseWrapper) {
View Full Code Here

Examples of org.jgroups.blocks.VotingAdapter.VoteResult

                    continue;
                case PROCESS_BREAK:
                    return false;
            }

            VoteResult result = (VoteResult) response.getValue();

            totalPositiveVotes += result.getPositiveVotes();
            totalNegativeVotes += result.getNegativeVotes();
        }

        boolean voteResult = (totalNegativeVotes == 0 && totalPositiveVotes > 0);

        if (decree instanceof TwoPhaseVotingAdapter.TwoPhaseWrapper) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.