Examples of VoltMessage


Examples of org.voltcore.messaging.VoltMessage

    public VoltMessage drain()
    {
        if (!m_mustDrain || m_replayEntries.isEmpty()) {
            return null;
        }
        VoltMessage head = m_replayEntries.firstEntry().getValue().drain();
        while (head == null) {
            m_replayEntries.pollFirstEntry();
            if (!m_replayEntries.isEmpty()) {
                // This will end up null if the next ReplayEntry was just a sentinel.
                // We'll keep going.
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

        // Maintain the CI invariant that responses arrive in txnid order.
        Collections.sort(doneCounters);
        for (Long key : doneCounters) {
            DuplicateCounter counter = m_duplicateCounters.remove(key);
            VoltMessage resp = counter.getLastResponse();
            if (resp != null && resp instanceof InitiateResponseMessage) {
                InitiateResponseMessage msg = (InitiateResponseMessage)resp;
                if (msg.shouldCommit()) {
                    m_repairLogTruncationHandle = m_repairLogAwaitingCommit;
                    m_repairLogAwaitingCommit = msg.getTxnId();
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

            try {
                final JSONObject jsObj = new JSONObject(jsString);
                boolean initiateSnapshot;

                // Do scan work on all known live hosts
                VoltMessage msg = new SnapshotCheckRequestMessage(jsString);
                List<Integer> liveHosts = VoltDB.instance().getHostMessenger().getLiveHostIds();
                for (int hostId : liveHosts) {
                    m_mb.send(CoreUtils.getHSIdFromHostAndSite(hostId, HostMessenger.SNAPSHOT_IO_AGENT_ID), msg);
                }
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

        m_replicaRepairStructs.put(m_mailbox.getHSId(), new ReplicaRepairStruct());

        tmLog.info(m_whoami + "found " + m_survivors.size()
                 + " surviving leaders to repair. "
                 + " Survivors: " + CoreUtils.hsIdCollectionToString(m_survivors));
        VoltMessage logRequest = makeRepairLogRequestMessage(m_requestId);
        m_mailbox.send(com.google_voltpatches.common.primitives.Longs.toArray(m_survivors), logRequest);
        m_mailbox.send(m_mailbox.getHSId(), logRequest);
    }
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

            // send the repair log union to all the survivors. SPIs will ignore
            // CompleteTransactionMessages for transactions which have already
            // completed, so this has the effect of making sure that any holes
            // in the repair log are filled without explicitly having to
            // discover and track them.
            VoltMessage repairMsg = createRepairMessage(li);
            tmLog.debug(m_whoami + "repairing: " + m_survivors + " with: " + TxnEgo.txnIdToString(li.getTxnId()));
            if (tmLog.isTraceEnabled()) {
                tmLog.trace(m_whoami + "repairing with message: " + repairMsg);
            }
            m_mailbox.repairReplicasWith(m_survivors, repairMsg);
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

                m_currentTransactionState = currentTxnState;
                if (currentTxnState == null) {
                    // poll the messaging layer for a while as this site has nothing to do
                    // this will likely have a message/several messages immediately in a heavy workload
                    // Before blocking record the starvation
                    VoltMessage message = m_mailbox.recv();
                    if (message == null) {
                        message = m_mailbox.recvBlocking(5);
                    }

                    // do periodic work
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

            TransactionState currentTxnState = null;
            m_currentTransactionState = currentTxnState;
            if (currentTxnState == null) {
                // poll the messaging layer for a while as this site has nothing to do
                // this will likely have a message/several messages immediately in a heavy workload
                VoltMessage message = m_mailbox.recv();
                tick();
                if (message != null) {
                    handleMailboxMessage(message);
                }
                else if (!loopUntilPoison){
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

    @Override
    public synchronized VoltMessage recv(Subject[] subjects) {
        for (Subject s : subjects) {
            final Deque<VoltMessage> dq = m_messages.get(s.getId());
            assert(dq != null);
            VoltMessage m = dq.poll();
            if (m != null) {
                return m;
            }
        }
        return null;
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

        return null;
    }

    @Override
    public synchronized VoltMessage recvBlocking(Subject[] subjects) {
        VoltMessage message = null;
        while (message == null) {
            for (Subject s : subjects) {
                final Deque<VoltMessage> dq = m_messages.get(s.getId());
                message = dq.poll();
                if (message != null) {
View Full Code Here

Examples of org.voltcore.messaging.VoltMessage

        return null;
    }

    @Override
    public synchronized VoltMessage recvBlocking(Subject[] subjects, long timeout) {
        VoltMessage message = null;
        for (Subject s : subjects) {
            final Deque<VoltMessage> dq = m_messages.get(s.getId());
            message = dq.poll();
            if (message != null) {
                return message;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.