def __init__(self, aCritter, aSettings, aPostOffice): self.mSettings = aSettings Rite.__init__(self, aCritter, aSettings, aPostOffice, Rites.RiteCommon.REGISTRY, RegistryMessageProcessor) # Set subscription channels. self.mPostOffice.addSubscriptionChannel(SUBSCRIPTION_CHANNEL_ALL) # The dictionary of received requests. self.mRecvReq = {} self.mRecvReq['Command_PresentYourself_Req'] = {} # The dictionary of sent requests. self.mSentReq = {} self.mSentReq['Command_PresentYourself_Req'] = {} # The dictionary of known crittnicks. self.mKnownCrittnicks = {} # The dictionary of known heartbeats. self.mKnownHeartbeats = {} # The dictionary of known rites. self.mKnownRites = {}
def __init__(self, aCritter, aSettings, aPostOffice): """Initializes the rite. Arguments: aCritter: The critter. aSettings: The settings. aPostOffice: The post office. """ Rite.__init__(self, aCritter, aSettings, aPostOffice, Rites.RiteCommon.HEARTBEAT, HeartbeatMessageProcessor) # Set subscription channels. self.mPostOffice.addSubscriptionChannel(SUBSCRIPTION_CHANNEL_ALL)
def __init__(self, aCritter, aSettings, aPostOffice): Rite.__init__(self, aCritter, aSettings, aPostOffice, Rites.RiteCommon.DATABASE, DatabaseMessageProcessor) # Set subscription channels. self.mPostOffice.addSubscriptionChannel(SUBSCRIPTION_CHANNEL_ALL) # The dictionary of received requests. # TODO: Add perl's auto-vivification. self.mRecvReq = {} self.mRecvReq['Command_DescribeCrittwork_Req' ] = {} self.mRecvReq['Command_DetermineGraphCycle_Req'] = {} self.mRecvReq['Command_DetermineWorkCycle_Req' ] = {} self.mRecvReq['Command_LoadGraphAndWork_Req' ] = {} self.mRecvReq['Command_LoadGraphDetails_Req' ] = {} self.mRecvReq['Command_LoadWorkDetails_Req' ] = {}
def __init__(self, aCritter, aSettings, aPostOffice): Rite.__init__(self, aCritter, aSettings, aPostOffice, Rites.RiteCommon.GRAPH, GraphMessageProcessor) # Set the initial state of the rite. self.mState = Rites.RiteCommon.STATE_STARTING # Set subscription channels. self.mPostOffice.addSubscriptionChannel(SUBSCRIPTION_CHANNEL_ALL) # The dictionary of received requests. self.mRecvReq = {} self.mRecvReq['Command_ExecuteGraph_Req'] = {} # The dictionary of sent requests. self.mSentReq = {} self.mSentReq['Command_DetermineGraphCycle_Req'] = {} self.mSentReq['Command_Election_Req' ] = {} self.mSentReq['Command_LoadGraphAndWork_Req' ] = {} self.mSentReq['Command_LoadGraphDetails_Req' ] = {} self.mSentReq['Command_LoadWorkDetails_Req' ] = {} self.mSentReq['Command_OrderWorkExecution_Req' ] = {} # The dictionary of elections. self.mElections = {} # Dictionaries of graph data. self.mGraphs = [] self.mGraphDetails = {} # Dictionaries of work data. self.mWorks = {} self.mWorkDetails = {} self.mWorkPredecessors = {} # The dictionary of sessions. self.mSessions = {}
def __init__(self, aCritter, aSettings, aPostOffice): Rite.__init__(self, aCritter, aSettings, aPostOffice, Rites.RiteCommon.POKE, PokeMessageProcessor) # Set subscription channels. self.mPostOffice.addSubscriptionChannel(SUBSCRIPTION_CHANNEL_ALL)