Esempio n. 1
0
 def __init__(self):
     """
     - ballotnumber: the highest ballotnumber Acceptor has encountered
     - accepted: all pvalues Acceptor has accepted thus far
     """
     Node.__init__(self, NODE_ACCEPTOR)
     if self.durable:
         self.file = open('concoordlog', 'a')
     self.ballotnumber = (0, '')
     self.last_accept_msg_id = -1
     self.accepted = PValueSet()
     self.objectsnapshot = (0, None)
Esempio n. 2
0
 def __init__(self):
     """
     - ballotnumber: the highest ballotnumber Acceptor has encountered
     - accepted: all pvalues Acceptor has accepted thus far
     """
     Node.__init__(self, NODE_ACCEPTOR)
     # self.file = open('concoordlog', 'a')
     self.ballotnumber = (0, 0)
     self.last_accept_msg_id = -1
     self.accepted = PValueSet()
     self.objectsnapshot = (0, None)
     if self.debug and False:
         profile_on()  # Turn profiling on!
Esempio n. 3
0
 def __init__(self, acceptors, ballotnumber, commandnumber, proposal):
     """ResponseCollector state
     - ballotnumber: ballotnumber for the corresponding msg
     - commandnumber: commandnumber for the corresponding msg
     - proposal: proposal for the corresponding msg
     - acceptors: group of acceptor nodes for the corresponding msg
     - sent: msgids for the messages that have been sent
     - received: dictionary that keeps <peer:reply> mappings
     - ntotal: # of acceptornodes for the corresponding msg
     - nquorum: # of accepts needed for success
     - possiblepvalueset: Set of pvalues collected from acceptors
     """
     self.ballotnumber = ballotnumber
     self.commandnumber = commandnumber
     self.proposal = proposal
     self.acceptors = acceptors
     self.receivedcount = 0
     self.ntotal = len(self.acceptors)
     self.nquorum = self.ntotal / 2 + 1
     self.possiblepvalueset = PValueSet()