Add mqtt messenger file for implementation of paxos messenger

This commit is contained in:
DSTO\pivatom
2019-01-11 11:40:27 +10:30
parent acc287d572
commit 97fd356038

View File

@@ -0,0 +1,42 @@
from DecisionSystem.PaxosDecision.paxosmessenger import Messenger
from
class MqttMessenger(Messenger):
def __init__(self):
def send_prepare(self, proposal_id):
'''
Broadcasts a Prepare message to all Acceptors
'''
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