Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
ResponseCollector keeps the state related to both MSG_PREPARE and
MSG_PROPOSE.

src/c/o/concoord-1.1.0/concoord/replica.py   concoord(Download)
from concoord.pvalue import PValueSet
from concoord.nameserver import Nameserver
from concoord.responsecollector import ResponseCollector
from concoord.exception import ConCoordException, BlockingReturn, UnblockingReturn
from concoord.node import *
        # Since we never propose a commandnumber that is beyond the window,
        # we can simply use the current replica set here
        prc = ResponseCollector(self.replicas, recentballotnumber,
                                givencommandnumber, givenproposal)
        if len(prc.quorum) == 0:
        if self.debug: self.logger.write("State", "Preparing command: %d:%s with ballotnumber %s"
                          % (givencommandnumber, givenproposal,str(newballotnumber)))
        prc = ResponseCollector(self.replicas, newballotnumber,
                                givencommandnumber, givenproposal)
        if len(prc.quorum) == 0:
                    if self.debug: self.logger.write("Paxos State", "Sending PROPOSE for %d, %s"
                                                     % (chosencommandnumber, chosenproposal))
                    newprc = ResponseCollector(prc.quorum, prc.ballotnumber,
                                               chosencommandnumber, chosenproposal)
                    self.outstandingproposes[chosencommandnumber] = newprc

src/c/o/concoord-HEAD/concoord/replica.py   concoord(Download)
from concoord.pvalue import PValueSet
from concoord.nameserver import Nameserver
from concoord.responsecollector import ResponseCollector
from concoord.exception import ConCoordException, BlockingReturn, UnblockingReturn
from concoord.node import *
        # Since we never propose a commandnumber that is beyond the window,
        # we can simply use the current replica set here
        prc = ResponseCollector(self.replicas, recentballotnumber,
                                givencommandnumber, givenproposal)
        if len(prc.quorum) == 0:
        if self.debug: self.logger.write("State", "Preparing command: %d:%s with ballotnumber %s"
                          % (givencommandnumber, givenproposal,str(newballotnumber)))
        prc = ResponseCollector(self.replicas, newballotnumber,
                                givencommandnumber, givenproposal)
        if len(prc.quorum) == 0:
                    if self.debug: self.logger.write("Paxos State", "Sending PROPOSE for %d, %s"
                                                     % (chosencommandnumber, chosenproposal))
                    newprc = ResponseCollector(prc.quorum, prc.ballotnumber,
                                               chosencommandnumber, chosenproposal)
                    self.outstandingproposes[chosencommandnumber] = newprc