Add mqtt messenger file for implementation of paxos messenger
This commit is contained in:
42
DecisionSystem/PaxosDecision/mqttmessenger.py
Normal file
42
DecisionSystem/PaxosDecision/mqttmessenger.py
Normal 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
|
||||||
Reference in New Issue
Block a user