Should only receive these messages at replicas, when told by the leader
351994
private void handleIv2LogFaultMessage(Iv2LogFaultMessage message)
    {
        //call the internal log write with the provided SP handle and wait for the fault log IO to complete
        SettableFuture<Boolean> written = writeIv2ViableReplayEntryInternal(message.getSpHandle());

        // Get the Fault Log Status here to ensure the replica completes the log fault task is finished before
        // it starts processing transactions again
        blockFaultLogWriteStatus(written);

        setMaxSeenTxnId(message.getSpHandle());

        // Also initialize the unique ID generator and the last durable unique ID using
        // the value sent by the master
        m_uniqueIdGenerator.updateMostRecentlyGeneratedUniqueId(message.getSpUniqueId());
        m_cl.initializeLastDurableUniqueId(m_durabilityListener, m_uniqueIdGenerator.getLastUniqueId());
    }
205337
private void deliverBeatAnnouncement(final Beat beat) {
        for (final MasterListener listener : getMasterListeners()) {
            try {
                listener.newBeat(beat);
            } catch (Throwable t) {
                logger.warn("Problem delivering master beat announcement to listener", t);
            }
        }
    }
476622
private void deliverReadyTxns() {
        // First, pull all the sequenced messages, if any.
        VoltMessage m = m_replaySequencer.poll();
        while(m != null) {
            deliver(m);
            m = m_replaySequencer.poll();
        }
        // Then, try to pull all the drainable messages, if any.
        m = m_replaySequencer.drain();
        while (m != null) {
            if (m instanceof Iv2InitiateTaskMessage) {
                // Send IGNORED response for all SPs
                Iv2InitiateTaskMessage task = (Iv2InitiateTaskMessage) m;
                final InitiateResponseMessage response = new InitiateResponseMessage(task);
                response.setResults(new ClientResponseImpl(ClientResponse.UNEXPECTED_FAILURE,
                            new VoltTable[0],
                            ClientResponseImpl.IGNORED_TRANSACTION));
                m_mailbox.send(response.getInitiatorHSId(), response);
            }
            m = m_replaySequencer.drain();
        }
    }
365688
public function rowHasMessage($replicator_id)
    {
        $row_has_message = false;

        foreach ($this->input_cells as $cell) {
            if ($cell->getWidget($replicator_id)->hasMessage()) {
                $row_has_message = true;
                break;
            }
        }

        return $row_has_message;
    }
756035
def publish(self, message, channel=None):
        
        if not self.master:
            return
        channel = channel or ''
        data = json.dumps(message)
        self.publisher.send_string("%s %s" % (channel, data))
1136172
function GameMsg(gm) {
        gm = gm || {};

        /**
         * ### GameMsg.id
         *
         * A randomly generated unique id
         */
        this.id = 'undefined' === typeof gm.id ?
            Math.floor(Math.random()*1000000) : gm.id;

        /**
         * ### GameMsg.sid
         *
         * The socket id, if provided
         *
         * Used by SocketIO to prevent spoofing, not used by other sockets
         * TODO: could this be session instead?
         */
        this.sid = gm.sid;

        /**
         * ### GameMsg.session
         *
         * The session id in which the message was generated
         */
        this.session = gm.session;

        /**
         * ### GameMsg.stage
         *
         * The game-stage in which the message was generated
         *
         * @see GameStage
         */
        this.stage = gm.stage;

        /**
         * ### GameMsg.action
         *
         * The action of the message
         *
         * @see node.constants.action
         */
        this.action = gm.action;

        /**
         * ### GameMsg.target
         *
         * The target of the message
         *
         * @see node.constants.target
         */
        this.target = gm.target;

        /**
         * ### GameMsg.from
         *
         * The id of the sender of the message
         *
         * @see Player.id
         * @see node.player.id
         */
        this.from = gm.from;

        /**
         * ### GameMsg.to
         *
         * The id of the receiver of the message
         *
         * @see Player.id
         * @see node.player.id
         */
        this.to = gm.to;

        /**
         * ### GameMsg.text
         *
         * An optional text adding a description for the message
         */
        this.text = gm.text;

        /**
         * ### GameMsg.data
         *
         * An optional payload field for the message
         */
        this.data = gm.data;

        /**
         * ### GameMsg.priority
         *
         * A priority index associated to the message
         */
        this.priority = gm.priority;

        /**
         * ### GameMsg.reliable
         *
         * Experimental. Disabled for the moment
         *
         * If set, requires ackwnoledgment of delivery
         */
        this.reliable = gm.reliable;

        /**
         * ### GameMsg.created
         *
         * A timestamp of the date of creation
         */
        this.created = J.getDate();

        /**
         * ### GameMsg.forward
         *
         * If TRUE, the message is a forward.
         *
         * E.g. between nodeGame servers
         */
        this.forward = 0;
    }
1274791
async def on_raw_760(self, message):
        
        target, targetmeta = self._parse_user(message.params[0])
        key, _, value = message.params[1:4]

        if target not in self._pending['whois']:
            return
        if target in self.users:
            self._sync_user(target, targetmeta)

        self._whois_info[target].setdefault('metadata', {})
        self._whois_info[target]['metadata'][key] = value
1033716
function onPeerMessage(peer,msg)
    {
        scope.dispatchEvent("peerMessage",{message:msg,id:peer.id,rtc:peer.rtcId,array:false,fallback:false});
    }
93713
@Override
    public boolean sequenceForReplay(VoltMessage message)
    {
        boolean canDeliver = false;
        long sequenceWithUniqueId = Long.MIN_VALUE;

        boolean commandLog = (message instanceof TransactionInfoBaseMessage &&
                (((TransactionInfoBaseMessage)message).isForReplay()));

        boolean sentinel = message instanceof MultiPartitionParticipantMessage;

        boolean replay = commandLog || sentinel;
        boolean sequenceForReplay = m_isLeader && replay;

        if (replay) {
            sequenceWithUniqueId = ((TransactionInfoBaseMessage)message).getUniqueId();
        }

        if (sequenceForReplay) {
            InitiateResponseMessage dupe = m_replaySequencer.dedupe(sequenceWithUniqueId,
                    (TransactionInfoBaseMessage) message);
            if (dupe != null) {
                // Duplicate initiate task message, send response
                m_mailbox.send(dupe.getInitiatorHSId(), dupe);
            }
            else if (!m_replaySequencer.offer(sequenceWithUniqueId, (TransactionInfoBaseMessage) message)) {
                canDeliver = true;
            }
            else {
                deliverReadyTxns();
            }

            // If it's a DR sentinel, send an acknowledgement
            if (sentinel && !commandLog) {
                MultiPartitionParticipantMessage mppm = (MultiPartitionParticipantMessage) message;
                final InitiateResponseMessage response = new InitiateResponseMessage(mppm);
                ClientResponseImpl clientResponse =
                        new ClientResponseImpl(ClientResponseImpl.UNEXPECTED_FAILURE,
                                new VoltTable[0], ClientResponseImpl.IGNORED_TRANSACTION);
                response.setResults(clientResponse);
                m_mailbox.send(response.getInitiatorHSId(), response);
            }
        }
        else {
            if (replay) {
                // Update last seen and last polled uniqueId for replicas
                m_replaySequencer.updateLastSeenUniqueId(sequenceWithUniqueId,
                        (TransactionInfoBaseMessage) message);
                m_replaySequencer.updateLastPolledUniqueId(sequenceWithUniqueId,
                        (TransactionInfoBaseMessage) message);
            }

            canDeliver = true;
        }

        return canDeliver;
    }
1025330
void notifyOmemoMucMessageReceived(MultiUserChat muc,
                                       Stanza stanza,
                                       OmemoMessage.Received decryptedMessage) {
        for (OmemoMucMessageListener l : omemoMucMessageListeners) {
            l.onOmemoMucMessageReceived(muc, stanza, decryptedMessage);
        }
    }
564909
def _dry_message_received(self, msg):
        """"""
        for callback in self._dry_wet_callbacks:
            callback(LeakSensorState.DRY)
        self._update_subscribers(0x11)
1236268
function onServerMessage(message, rinfo) {

	var packet,
	    respond;

	alchemy.setStatus('multicast_messages', ++messages);

	try {
		packet = bson.deserialize(message);
	} catch(err) {
		log.warn('Received corrupt multicast message from ' + rinfo.address);
		return;
	}

	// Ignore packets that come from here
	if (packet.origin == alchemy.discovery_id) {
		return;
	}

	packet.remote = rinfo;

	if (packet.respond) {
		respond = function respond(data) {

			var response_packet = {
				type         : 'response',
				response_to  : packet.id,
				data         : data
			};

			submit(response_packet);
		};
	}

	// Emit it as a multicast event
	alchemy.emit('multicast', packet, respond, null);

	if (packet.response_to) {
		if (typeof callbacks[packet.response_to] === 'function') {
			callbacks[packet.response_to](packet.data, packet);
		}
	} else {
		// Emit it for multicast listeners only
		mevents.emit(packet.type, packet.data, packet, respond, null);
	}
}
272239
def notify_peer_message(self, message, sender_id):
        """"""
        payload = message.SerializeToString()
        self._notify(
            "consensus_notifier_notify_peer_message",
            payload,
            len(payload),
            sender_id,
            len(sender_id))
38672
@Override
    public void deliver(VoltMessage message)
    {
        if (!(message instanceof Iv2RepairLogResponseMessage)) {
            return;
        }
        Iv2RepairLogResponseMessage response = (Iv2RepairLogResponseMessage)message;
        if (response.getRequestId() != m_requestId) {
            if (repairLogger.isTraceEnabled()) {
                repairLogger.trace(m_whoami + "rejecting stale repair response."
                        + " Current request id is: " + m_requestId
                        + " Received response for request id: " + response.getRequestId());
            }
            return;
        }

        ReplicaRepairStruct rrs = m_replicaRepairStructs.get(response.m_sourceHSId);
        if (rrs.m_expectedResponses < 0 ) {
            if (repairLogger.isDebugEnabled()) {
                repairLogger.debug(m_whoami + "collecting " + response.getOfTotal()
                + " repair log entries from "
                + CoreUtils.hsIdToString(response.m_sourceHSId));
            }
        }
        // Long.MAX_VALUE has rejoin semantics
        if (response.getHandle() != Long.MAX_VALUE) {
            m_maxSeenTxnId = Math.max(m_maxSeenTxnId, response.getHandle());
        }

        if (response.getPayload() != null) {
            m_repairLogUnion.add(response);
            if (repairLogger.isDebugEnabled()) {
                repairLogger.debug(m_whoami + " collected from " + CoreUtils.hsIdToString(response.m_sourceHSId) +
                        ", message: " + response.getPayload());
            }
        }
        if (rrs.update(response)) {
            if (repairLogger.isDebugEnabled()) {
                repairLogger.debug(m_whoami + "collected " + rrs.m_receivedResponses
                        + " responses for " + rrs.m_expectedResponses
                        + " repair log entries from " + CoreUtils.hsIdToString(response.m_sourceHSId));
            }
            if (areRepairLogsComplete()) {

                //no repair needed for MigratePartitionLeader
                if (m_isMigratePartitionLeader) {
                    m_promotionResult.set(new RepairResult(m_maxSeenTxnId));
                } else {
                    repairSurvivors();
                }
            }
        }
    }
771500
def _fix_alert_poster(self, state, shard):
        '''
        
        '''
        recp = recipient.Broadcast(AlertPoster.protocol_id, shard)
        state.alerter.update_recipients(recp)
170296
def messages
      RelationProxy.new(self, Message, [Operations::Create, Operations::Paginate, Operations::Find, Operations::Delete, Operations::Destroy])
    end
226495
def receive_promise(self, msg):
        '''
        
        '''
        self.observe_proposal(msg.proposal_id)

        if not self.leader and msg.proposal_id == self.proposal_id and msg.from_uid not in self.promises_received:

            self.promises_received.add(msg.from_uid)

            if self.highest_accepted_id is None or msg.last_accepted_id > self.highest_accepted_id:
                self.highest_accepted_id = msg.last_accepted_id
                if msg.last_accepted_value is not None:
                    self.proposed_value = msg.last_accepted_value

            if len(self.promises_received) == self.quorum_size:
                self.leader = True

                if self.proposed_value is not None:
                    self.current_accept_msg = Accept(self.network_uid, self.proposal_id, self.proposed_value)
                    return self.current_accept_msg