Package org.mule.util.journal.queue

Examples of org.mule.util.journal.queue.LocalQueueTxJournalEntry


        final String queueName = RandomStringUtils.randomAlphanumeric(129);
        final Serializable payload = "Hello World!";
        final int txId = 1;

        TransactionJournalFile<Integer, LocalQueueTxJournalEntry> journal = openJournal();
        journal.logOperation(new LocalQueueTxJournalEntry(txId, (byte) 6, queueName, payload));
        journal.close();

        journal = openJournal();

        Collection<LocalQueueTxJournalEntry> entries = journal.getLogEntries(txId);
        assertThat(entries, is(notNullValue()));
        assertThat(entries.size(), equalTo(1));

        LocalQueueTxJournalEntry entry = entries.iterator().next();
        assertThat(entry.getQueueName(), equalTo(queueName));
        assertThat(entry.getValue(), equalTo(payload));
    }
View Full Code Here

TOP

Related Classes of org.mule.util.journal.queue.LocalQueueTxJournalEntry

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.