Package org.apache.activemq.kaha.impl.async.JournalFacade

Examples of org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade


    }

    public void testCanReadFromArchivedLogFile() throws InvalidRecordLocationException, InterruptedException, IOException {

        Packet data1 = createPacket("Hello World 1");
        RecordLocationFacade location1 = (RecordLocationFacade)journal.write(data1, false);

        RecordLocationFacade pos;
        int counter = 0;
        do {

            Packet p = createPacket("<<<data>>>");
            pos = (RecordLocationFacade)journal.write(p, false);
            if (counter++ % 1000 == 0) {
                journal.setMark(pos, false);
            }

        } while (pos.getLocation().getDataFileId() < 5);

        // Now see if we can read that first packet.
        Packet data;
        data = journal.read(location1);
        assertEquals(data1, data);
View Full Code Here


    }

    public void testCanReadFromArchivedLogFile() throws InvalidRecordLocationException, InterruptedException, IOException {

        Packet data1 = createPacket("Hello World 1");
        RecordLocationFacade location1 = (RecordLocationFacade)journal.write(data1, false);

        RecordLocationFacade pos;
        int counter = 0;
        do {

            Packet p = createPacket("<<<data>>>");
            pos = (RecordLocationFacade)journal.write(p, false);
            if (counter++ % 1000 == 0) {
                journal.setMark(pos, false);
            }

        } while (pos.getLocation().getDataFileId() < 5);

        // Now see if we can read that first packet.
        Packet data;
        data = journal.read(location1);
        assertEquals(data1, data);
View Full Code Here

        assertTrue(l1.compareTo(l2) < 0);

        // Sort them using a list. Put them in the wrong order.
        ArrayList<RecordLocationFacade> l = new ArrayList<RecordLocationFacade>();
        l.add(new RecordLocationFacade(l2));
        l.add(new RecordLocationFacade(l3));
        l.add(new RecordLocationFacade(l1));
        Collections.sort(l);

        // Did they get sorted to the correct order?
        LOG.debug(l.get(0).toString());
        assertSame(l.get(0).getLocation(), l1);
View Full Code Here

    }

    public void testCanReadFromArchivedLogFile() throws InvalidRecordLocationException, InterruptedException, IOException {

        Packet data1 = createPacket("Hello World 1");
        RecordLocationFacade location1 = (RecordLocationFacade)journal.write(data1, false);

        RecordLocationFacade pos;
        int counter = 0;
        do {

            Packet p = createPacket("<<<data>>>");
            pos = (RecordLocationFacade)journal.write(p, false);
            if (counter++ % 1000 == 0) {
                journal.setMark(pos, false);
            }

        } while (pos.getLocation().getDataFileId() < 5);

        // Now see if we can read that first packet.
        Packet data;
        data = journal.read(location1);
        assertEquals(data1, data);
View Full Code Here

        assertTrue(l1.compareTo(l2) < 0);

        // Sort them using a list. Put them in the wrong order.
        ArrayList<RecordLocationFacade> l = new ArrayList<RecordLocationFacade>();
        l.add(new RecordLocationFacade(l2));
        l.add(new RecordLocationFacade(l3));
        l.add(new RecordLocationFacade(l1));
        Collections.sort(l);

        // Did they get sorted to the correct order?
        LOG.debug(l.get(0));
        assertSame(l.get(0).getLocation(), l1);
View Full Code Here

    }

    public void testCanReadFromArchivedLogFile() throws InvalidRecordLocationException, InterruptedException, IOException {

        Packet data1 = createPacket("Hello World 1");
        RecordLocationFacade location1 = (RecordLocationFacade)journal.write(data1, false);

        RecordLocationFacade pos;
        int counter = 0;
        do {

            Packet p = createPacket("<<<data>>>");
            pos = (RecordLocationFacade)journal.write(p, false);
            if (counter++ % 1000 == 0) {
                journal.setMark(pos, false);
            }

        } while (pos.getLocation().getDataFileId() < 5);

        // Now see if we can read that first packet.
        Packet data;
        data = journal.read(location1);
        assertEquals(data1, data);
View Full Code Here

TOP

Related Classes of org.apache.activemq.kaha.impl.async.JournalFacade.RecordLocationFacade

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.