[virtualcommons-svn] commit/irrigation: alllee: merging from stable
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-03-28 06:19:54
|
1 new commit in irrigation: https://bitbucket.org/virtualcommons/irrigation/changeset/f8790891fb25/ changeset: f8790891fb25 user: alllee date: 2012-03-28 08:19:55 summary: merging from stable affected #: 1 file diff -r be826810ad073d790e64021161c9432e5879d89a -r f8790891fb256820aec54fd546c4790bef9bfac2 src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java --- a/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java +++ b/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java @@ -160,6 +160,11 @@ addEventProcessor(new EventTypeProcessor<ShowRequest>(ShowRequest.class, true) { @Override public void handle(ShowRequest request) { + /* + if (stateMachine.state == IrrigationServerState.ROUND_IN_PROGRESS) { + sendFacilitatorMessage("Ignoring request: " + request + " - round is currently running"); + } + */ if (request.getId().equals(getFacilitatorId())) { synchronized (clients) { for (Identifier id: clients.keySet()) { @@ -333,7 +338,9 @@ // reset group's available flow and re-allocate water to each participant in this group group.resetCurrentlyAvailableFlowCapacity(); int timeLeft = (int) (currentRoundDuration.getTimeLeft() / 1000); - // allocate flow to each participant + // allocate flow to each participant - this works because GroupDataModel uses a LinkedHashMap that preserves + // iteration order (initial order of participants added to the group), otherwise we'd have to sort by priority + // string for (ClientData clientData : group.getClientDataMap().values()) { // for undisrupted flow extensions, disabled for the time being. // if (clientData.getAvailableFlowCapacity() <= 0 && getConfiguration().isUndisruptedFlowRequired()){ @@ -416,13 +423,11 @@ } private void stopRound() { - state = IrrigationServerState.WAITING; sendEndRoundEvents(); persistRound(); cleanupRound(); - // FIXME: have to wait for .... some reason? - Utils.sleep(2000); advanceToNextRound(); + state = IrrigationServerState.WAITING; } private void sendEndRoundEvents() { @@ -449,6 +454,7 @@ } private void persistRound() { + logger.debug("Saving round data"); persister.persist(serverDataModel); } Repository URL: https://bitbucket.org/virtualcommons/irrigation/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |