Add files for Paxos decision system.
This commit is contained in:
37
DecisionSystem/PaxosDecision/paxosmessenger.py
Normal file
37
DecisionSystem/PaxosDecision/paxosmessenger.py
Normal file
@@ -0,0 +1,37 @@
|
||||
from proposal import Proposal
|
||||
|
||||
class Messenger():
|
||||
def send_prepare(self, proposal_id):
|
||||
'''
|
||||
Broadcasts a Prepare message to all Acceptors
|
||||
'''
|
||||
|
||||
NotImplementedError
|
||||
|
||||
def send_promise(self, proposer_id, proposal_id, previous_proposal):
|
||||
'''
|
||||
Sends a Promise message to the specified Proposer
|
||||
'''
|
||||
|
||||
NotImplementedError
|
||||
|
||||
def send_accept(self, proposal):
|
||||
'''
|
||||
Broadcasts an Accept message to all Acceptors
|
||||
'''
|
||||
|
||||
NotImplementedError
|
||||
|
||||
def send_accepted(self, proposal):
|
||||
'''
|
||||
Broadcasts an Accepted message to all Learners
|
||||
'''
|
||||
|
||||
NotImplementedError
|
||||
|
||||
def on_resolution(self, proposal_id, value):
|
||||
'''
|
||||
Called when a resolution is reached
|
||||
'''
|
||||
|
||||
NotImplementedError
|
||||
Reference in New Issue
Block a user