예제 #1
0
 def _forward_first_phase_commit_unsuccessful(
     self,event_uuid,endpoint_uuid):
     '''
     @param {uuid} event_uuid
     @param {uuid} endpoint_uuid
     
     Partner endpoint is subscriber of event on this endpoint with
     uuid event_uuid.  Send to partner a message that the first
     phase of the commit was unsuccessful on endpoint with uuid
     endpoint_uuid (and therefore, it and everything along the path
     should roll back their commits).
     '''
     msg = waldoMessages._PartnerFirstPhaseResultMessage(
         event_uuid,endpoint_uuid,False)
     self._conn_obj.write(pickle.dumps(msg.msg_to_map()),self)
예제 #2
0
    def _forward_first_phase_commit_successful(
        self,event_uuid,endpoint_uuid,children_event_endpoint_uuids):
        '''
        @param {uuid} event_uuid

        @param {uuid} endpoint_uuid
        
        @param {array} children_event_endpoint_uuids --- 
        
        Partner endpoint is subscriber of event on this endpoint with
        uuid event_uuid.  Send to partner a message that the first
        phase of the commit was successful for the endpoint with uuid
        endpoint_uuid, and that the root can go on to second phase of
        commit when all endpoints with uuids in
        children_event_endpoint_uuids have confirmed that they are
        clear to commit.
        '''
        msg = waldoMessages._PartnerFirstPhaseResultMessage(
            event_uuid,endpoint_uuid,True,
            children_event_endpoint_uuids)
        self._conn_obj.write(pickle.dumps(msg.msg_to_map()),self)