Package org.voltcore.messaging

Examples of org.voltcore.messaging.Mailbox


        buddyHSId = 0;
        long[] non_local = configureHSIds(hsids);

        MpTestPlan plan = createTestPlan(batch_size, true, false, false, non_local);

        Mailbox mailbox = mock(Mailbox.class);
        SiteProcedureConnection siteConnection = mock(SiteProcedureConnection.class);

        MpTransactionState dut =
            new MpTransactionState(mailbox, taskmsg, allHsids, partMasters, buddyHSId, false);
View Full Code Here


        buddyHSId = 0;
        long[] non_local = configureHSIds(hsids);

        MpTestPlan plan = createTestPlan(batch_size, true, false, false, non_local);

        Mailbox mailbox = mock(Mailbox.class);
        SiteProcedureConnection siteConnection = mock(SiteProcedureConnection.class);

        MpTransactionState dut =
            new MpTransactionState(mailbox, taskmsg, allHsids, partMasters, buddyHSId, false);
View Full Code Here

        buddyHSId = 3;
        long[] non_local = configureHSIds(hsids);

        MpTestPlan plan = createTestPlan(batch_size, true, true, false, non_local);

        Mailbox mailbox = mock(Mailbox.class);
        SiteProcedureConnection siteConnection = mock(SiteProcedureConnection.class);

        MpTransactionState dut =
            new MpTransactionState(mailbox, taskmsg, allHsids, partMasters, buddyHSId, false);
View Full Code Here

        buddyHSId = 0;
        long[] non_local = configureHSIds(hsids);

        MpTestPlan plan = createTestPlan(batch_size, true, false, true, non_local);

        Mailbox mailbox = mock(Mailbox.class);
        SiteProcedureConnection siteConnection = mock(SiteProcedureConnection.class);

        MpTransactionState dut =
            new MpTransactionState(mailbox, taskmsg, allHsids, partMasters, buddyHSId, false);
View Full Code Here

        buddyHSId = 0;
        long[] non_local = configureHSIds(hsids);

        MpTestPlan plan = createTestPlan(batch_size, true, false, false, non_local);

        Mailbox mailbox = mock(Mailbox.class);
        SiteProcedureConnection siteConnection = mock(SiteProcedureConnection.class);

        MpTransactionState dut =
            new MpTransactionState(mailbox, taskmsg, allHsids, partMasters, buddyHSId, false);
View Full Code Here

        FragmentTaskMessage localFrag = mock(FragmentTaskMessage.class);
        FragmentTaskMessage remoteFrag = mock(FragmentTaskMessage.class);
        when(remoteFrag.getFragmentCount()).thenReturn(1);

        buddyHSId = 0;
        Mailbox mailbox = mock(Mailbox.class);

        MpTransactionState dut =
            new MpTransactionState(mailbox, taskmsg, allHsids, partMasters, buddyHSId, false);

        // create local work and verify the created localwork has the
View Full Code Here

                    depTable.clearRowData();
                }
            }
        }

        Mailbox mailbox = mock(Mailbox.class);
        SiteProcedureConnection siteConnection = mock(SiteProcedureConnection.class);

        MpTransactionState dut =
                new MpTransactionState(mailbox, taskmsg, allHsids, partMasters, buddyHSId, false);
View Full Code Here

    @Override
    public void send(long HSId, VoltMessage message) {
        outgoingMessages.add(new Message(HSId, message));

        Mailbox dest = postoffice.get(HSId);
        if (dest != null) {
            message.m_sourceHSId = m_hsId;
            dest.deliver(message);
        }
    }
View Full Code Here

    }

    @Override
    public void send(long[] HSIds, VoltMessage message) {
        for (int i=0; HSIds != null && i < HSIds.length; ++i) {
            Mailbox dest = postoffice.get(HSIds[i]);
            if (dest != null) {
                message.m_sourceHSId = m_hsId;
                dest.deliver(message);
            }
        }
    }
View Full Code Here

        }
    }

    private void forwardAckToOtherReplicas(long uso) {
        Pair<Mailbox, ImmutableList<Long>> p = m_ackMailboxRefs.get();
        Mailbox mbx = p.getFirst();

        if (mbx != null) {
            // partition:int(4) + length:int(4) +
            // signaturesBytes.length + ackUSO:long(8)
            final int msgLen = 4 + 4 + m_signatureBytes.length + 8;

            ByteBuffer buf = ByteBuffer.allocate(msgLen);
            buf.putInt(m_partitionId);
            buf.putInt(m_signatureBytes.length);
            buf.put(m_signatureBytes);
            buf.putLong(uso);

            BinaryPayloadMessage bpm = new BinaryPayloadMessage(new byte[0], buf.array());

            for( Long siteId: p.getSecond()) {
                mbx.send(siteId, bpm);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.voltcore.messaging.Mailbox

Copyright © 2018 www.massapicom. 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.