Package org.voltdb.messaging

Examples of org.voltdb.messaging.Iv2InitiateTaskMessage


    @Test
    public void testOneSitePartitionedRead() throws IOException
    {
        long txnId = 1234l;
        int batch_size = 3;
        Iv2InitiateTaskMessage taskmsg =
            new Iv2InitiateTaskMessage(
                    0,
                    -1,
                    (txnId-1),
                    txnId,
                    System.currentTimeMillis(),
View Full Code Here


    @Test
    public void testMultiSitePartitionedRead() throws IOException
    {
        long txnId = 1234l;
        int batch_size = 3;
        Iv2InitiateTaskMessage taskmsg =
            new Iv2InitiateTaskMessage(
                    0,
                    -1,
                    (txnId -1),
                    txnId,
                    System.currentTimeMillis(),
View Full Code Here

    @Test
    public void testSingleReplicatedReadFragment() throws IOException
    {
        long txnId = 1234l;
        int batch_size = 3;
        Iv2InitiateTaskMessage taskmsg =
            new Iv2InitiateTaskMessage(
                    3,
                    4,
                    (txnId - 1),
                    txnId,
                    System.currentTimeMillis(),
View Full Code Here

    @Test
    public void testOneSitePartitionedReadWithRollback() throws IOException
    {
        long txnId = 1234l;
        int batch_size = 3;
        Iv2InitiateTaskMessage taskmsg =
            new Iv2InitiateTaskMessage(
                    0,
                    0,
                    (txnId - 1),
                    txnId,
                    System.currentTimeMillis(),
View Full Code Here

    @Test
    public void testOneSitePartitionedReadWithBuddyRollback() throws IOException
    {
        long txnId = 1234l;
        int batch_size = 3;
        Iv2InitiateTaskMessage taskmsg =
            new Iv2InitiateTaskMessage(
                    0,
                    0,
                    (txnId - 1),
                    txnId,
                    System.currentTimeMillis(),
View Full Code Here

    @Test
    public void testTruncationHandleForwarding() throws IOException
    {
        long truncPt = 100L;
        Iv2InitiateTaskMessage taskmsg =
            new Iv2InitiateTaskMessage(0, 0, truncPt, 101L, System.currentTimeMillis(),
                                       true, false, new StoredProcedureInvocation(), 0, 0, false);
        assertEquals(truncPt, taskmsg.getTruncationHandle());

        FragmentTaskMessage localFrag = mock(FragmentTaskMessage.class);
        FragmentTaskMessage remoteFrag = mock(FragmentTaskMessage.class);
        when(remoteFrag.getFragmentCount()).thenReturn(1);
View Full Code Here

    @Test
    public void testMPReadWithDummyResponse() throws IOException
    {
        long txnId = 1234l;
        int batch_size = 3;
        Iv2InitiateTaskMessage taskmsg =
                new Iv2InitiateTaskMessage(
                        0,
                        -1,
                        (txnId -1),
                        txnId,
                        System.currentTimeMillis(),
View Full Code Here

public class TestRepairLog
{
    VoltMessage truncInitMsg(long truncPt, long handle)
    {
        Iv2InitiateTaskMessage msg = mock(Iv2InitiateTaskMessage.class);
        when(msg.getTruncationHandle()).thenReturn(truncPt);
        when(msg.getSpHandle()).thenReturn(handle);
        return msg;
    }
View Full Code Here

        // Mock an invocation for MockSPName.
        StoredProcedureInvocation spi = mock(StoredProcedureInvocation.class);
        when(spi.getProcName()).thenReturn(MockSPName);
        ParameterSet bleh = mock(ParameterSet.class);
        when(spi.getParams()).thenReturn(bleh);
        Iv2InitiateTaskMessage task =
            new Iv2InitiateTaskMessage(destHSId, // initHSID
                                       Long.MIN_VALUE, // coordHSID
                                       txnId - 1, // truncationHandle
                                       txnId,     // txnId
                                       System.currentTimeMillis(), // timestamp
                                       readOnly, // readonly
                                       singlePart, // single-part
                                       spi, // invocation
                                       Long.MAX_VALUE, // client interface handle
                                       Long.MAX_VALUE, // connectionId
                                       false); // isForReplay
        // sp: sphandle == txnid
        task.setTxnId(txnId);
        return task;
    }
View Full Code Here

    {
        long txnid = TxnEgo.makeZero(0).getTxnId();
        long primary_hsid = 1111l;

        createObjs();
        Iv2InitiateTaskMessage sptask = createMsg(txnid, false, true, primary_hsid);
        sptask.setSpHandle(txnid);
        dut.deliver(sptask);
        // verify no response sent yet
        verify(mbox, times(0)).send(anyLong(), (VoltMessage)anyObject());
        verify(mbox, times(0)).send(new long[] {anyLong()}, (VoltMessage)anyObject());
        InitiateResponseMessage resp = new InitiateResponseMessage(sptask);
View Full Code Here

TOP

Related Classes of org.voltdb.messaging.Iv2InitiateTaskMessage

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.