Search in sources :

Example 6 with JournalEntry

use of org.apache.jena.dboe.transaction.txn.journal.JournalEntry in project jena by apache.

the class TestJournal method journal_06.

@Test
public void journal_06() {
    ByteBuffer bb = ByteBuffer.allocateDirect(100);
    ByteBufferLib.fill(bb, (byte) 0XA5);
    Journal jrnl = Journal.create(Location.mem());
    JournalEntry e = new JournalEntry(JournalEntryType.REDO, ComponentId.allocLocal(), bb);
    jrnl.writeJournal(e);
    jrnl.sync();
    JournalEntry e2 = jrnl.readJournal(0);
    check(e, e2);
}
Also used : Journal(org.apache.jena.dboe.transaction.txn.journal.Journal) ByteBuffer(java.nio.ByteBuffer) JournalEntry(org.apache.jena.dboe.transaction.txn.journal.JournalEntry) Test(org.junit.Test)

Aggregations

Journal (org.apache.jena.dboe.transaction.txn.journal.Journal)6 JournalEntry (org.apache.jena.dboe.transaction.txn.journal.JournalEntry)6 Test (org.junit.Test)6 ByteBuffer (java.nio.ByteBuffer)2