Package nexj.core.rpc.ra.tx

Examples of nexj.core.rpc.ra.tx.MemoryJournal.forget()


     
      //A record that needs to be recovered. (XID1)
      assertEquals(2, recoveredOps.size());
      assertEquals(new JournalRecordTesting(makeXid(1), FileJournalRecordCopyInsert.OPCODE), recoveredOps.get(0));
      assertEquals(new JournalRecordTesting(makeXid(1), JournalRecordPrepared.OPCODE), recoveredOps.get(1));
      recovered.forget(makeXid(1));
     
      //Completed record (XID2) interleaved with record needing recovery (XID3)
      recovered = recoverJournal.recoverJournal(makeXid(3));
      recoveredOps = recovered.getRecords();
      assertEquals(2, recoveredOps.size());
View Full Code Here


      recovered = recoverJournal.recoverJournal(makeXid(3));
      recoveredOps = recovered.getRecords();
      assertEquals(2, recoveredOps.size());
      assertEquals(new JournalRecordTesting(makeXid(3), FileJournalRecordCopyUpdate.OPCODE), recoveredOps.get(0));
      assertEquals(new JournalRecordTesting(makeXid(3), JournalRecordPrepared.OPCODE), recoveredOps.get(1));
      recovered.forget(makeXid(3));
     
      recoverJournal.close();
   }

View Full Code Here

      //FORGET
      assertEquals(tempFile1, perJournal.getActiveJournal());
      j1.addRecord(new JournalRecordTesting(makeXid(5), JournalRecordCompleted.OPCODE));
      j1.flush();
      assertEquals(tempFile1, perJournal.getActiveJournal());
      j1.forget(makeXid(5))//COMPACT
      assertEquals(tempFile2, perJournal.getActiveJournal());
      assertEquals(nHeaderLength, tempFile1.length());
      assertEquals(nZeroObjectsLength, tempFile2.length());
      j1 = null;
     
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.