372937303731373237333734373537363737373837393740
case JournalStorageManager.QUEUE_BINDING_RECORD: return newBindingEncoding(id, buffer); case JournalStorageManager.ID_COUNTER_RECORD: EncodingSupport idReturn = new IDCounterEncoding(); idReturn.decode(buffer); return idReturn; case JournalStorageManager.GROUP_RECORD: return newGroupEncoding(id, buffer);
601602603604605606607608609610611612
case QUEUE_BINDING_RECORD: return JournalStorageManager.newBindingEncoding(id, buffer); case ID_COUNTER_RECORD: EncodingSupport idReturn = new IDCounterEncoding(); idReturn.decode(buffer); return idReturn; case JournalRecordIds.GROUP_RECORD: return JournalStorageManager.newGroupEncoding(id, buffer);
204205206207208209210211212213214
journalImpl.appendAddRecord(i * 100l, (byte)i, bytes, false); } for (int i = 25; i < 50; i++) { EncodingSupport support = new SimpleEncoding(5, (byte)i); journalImpl.appendAddRecord(i * 100l, (byte)i, support, false); } setupAndLoadJournal(JOURNAL_SIZE, 1024);
17311732173317341735173617371738173917401741
512, true); createJournal(); startJournal(); load(); EncodingSupport xid = new SimpleEncoding(10, (byte)0); prepare(1, xid); stopJournal(); createJournal(); startJournal();
17921793179417951796179717981799180018011802
journal.getDataFilesCount()); Assert.assertEquals(0, journal.getFreeFilesCount()); Assert.assertEquals(1, journal.getOpenedFilesCount()); Assert.assertEquals(1, journal.getIDMapSize()); EncodingSupport xid = new SimpleEncoding(10, (byte)0); prepare(1, xid); // in file 1 Assert.assertEquals(0, journal.getFreeFilesCount()); Assert.assertEquals(1, journal.getIDMapSize()); Assert.assertEquals(1, journal.getOpenedFilesCount());
19001901190219031904190519061907190819091910
Assert.assertEquals(1, journal.getDataFilesCount()); Assert.assertEquals(0, journal.getFreeFilesCount()); Assert.assertEquals(1, journal.getIDMapSize()); EncodingSupport xid = new SimpleEncoding(10, (byte)0); prepare(1, xid); // in file 1 List<String> files3 = fileFactory.listFiles(fileExtension); Assert.assertEquals(3, files3.size());
23762377237823792380238123822383238423852386
createJournal(); startJournal(); load(); addTx(1, 1); EncodingSupport xid = new SimpleEncoding(10, (byte)'p'); prepare(1, xid); stopJournal(); createJournal();
28262827282828292830283128322833283428352836
load(); addTx(1, 1, 2, 3, 4, 5, 6, 7, 8, 9); updateTx(1, 1, 2, 3, 4, 7, 8); deleteTx(1, 1, 2, 3, 4, 5); EncodingSupport xid = new SimpleEncoding(10, (byte)0); prepare(1, xid); stopJournal(); createJournal(); startJournal();
28452846284728482849285028512852285328542855
load(); addTx(1, 1, 2, 3, 4, 5, 6, 7, 8, 9); updateTx(1, 1, 2, 3, 4, 7, 8); deleteTx(1, 1, 2, 3, 4, 5); EncodingSupport xid = new SimpleEncoding(10, (byte)0); prepare(1, xid); commit(1); stopJournal(); createJournal();
28652866286728682869287028712872287328742875
load(); addTx(1, 1, 2, 3, 4, 5, 6, 7, 8, 9); updateTx(1, 1, 2, 3, 4, 7, 8); deleteTx(1, 1, 2, 3, 4, 5); EncodingSupport xid = new SimpleEncoding(10, (byte)0); prepare(1, xid); rollback(1); stopJournal(); createJournal();