Examples of SimpleEncoding


Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      setupAndLoadJournal(JOURNAL_SIZE, 100);

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());

      journalImpl.appendAddRecordTransactional(1, 1, (byte)1, new SimpleEncoding(1, (byte)1));

      setupAndLoadJournal(JOURNAL_SIZE, 100);

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());

      for (int i = 0; i < 10; i++)
      {
         journalImpl.appendAddRecordTransactional(77l, 1, (byte)1, new SimpleEncoding(1, (byte)1));
         journalImpl.forceMoveNextFile();
      }

      journalImpl.debugWait();

      Assert.assertEquals(12, factory.listFiles("tt").size());

      journalImpl.appendAddRecordTransactional(78l, 1, (byte)1, new SimpleEncoding(1, (byte)1));

      Assert.assertEquals(12, factory.listFiles("tt").size());

      setupAndLoadJournal(JOURNAL_SIZE, 100);
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());

      for (int i = 0; i < 10; i++)
      {
         journalImpl.appendAddRecordTransactional(1, i, (byte)1, new SimpleEncoding(1, (byte)1));
         journalImpl.forceMoveNextFile();
      }

      journalImpl.appendCommitRecord(1l, false);

      journalImpl.debugWait();

      Assert.assertEquals(12, factory.listFiles("tt").size());

      setupAndLoadJournal(JOURNAL_SIZE, 100);

      Assert.assertEquals(10, records.size());
      Assert.assertEquals(0, transactions.size());

      journalImpl.checkReclaimStatus();

      Assert.assertEquals(10, journalImpl.getDataFilesCount());

      Assert.assertEquals(12, factory.listFiles("tt").size());

      for (int i = 0; i < 10; i++)
      {
         journalImpl.appendDeleteRecordTransactional(2l, i);
         journalImpl.forceMoveNextFile();
      }

      journalImpl.appendCommitRecord(2l, false);

      journalImpl.appendAddRecord(100, (byte)1, new SimpleEncoding(5, (byte)1), false);

      journalImpl.forceMoveNextFile();

      journalImpl.appendAddRecord(101, (byte)1, new SimpleEncoding(5, (byte)1), false);

      journalImpl.checkReclaimStatus();

      Assert.assertEquals(1, journalImpl.getDataFilesCount());
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(0, transactions.size());

      journalImpl.appendAddRecordTransactional(1l,
                                               2l,
                                               (byte)3,
                                               new SimpleEncoding(1900 - JournalImpl.SIZE_ADD_RECORD_TX, (byte)4));

      journalImpl.appendCommitRecord(1l, false);

      journalImpl.debugWait();
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());

      for (int i = 0; i < 2; i++)
      {
         journalImpl.appendAddRecordTransactional(1l, i, (byte)0, new SimpleEncoding(1, (byte)15));
      }

      journalImpl.appendCommitRecord(1l, false);

      System.out.println("Files = " + factory.listFiles("tt"));
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());

      for (int i = 0; i < 20; i++)
      {
         journalImpl.appendAddRecordTransactional(1l, i, (byte)0, new SimpleEncoding(1, (byte)15));
         journalImpl.appendAddRecordTransactional(2l, i + 20l, (byte)0, new SimpleEncoding(1, (byte)15));
      }

      journalImpl.appendCommitRecord(1l, false);

      journalImpl.appendCommitRecord(2l, false);
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(10, factory.listFiles("tt").size());

      for (int i = 0; i < 10; i++)
      {
         journalImpl.appendAddRecord(i, (byte)0, new SimpleEncoding(1, (byte)0), false);
         journalImpl.forceMoveNextFile();
      }

      setupAndLoadJournal(JOURNAL_SIZE, 100, 2);
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());

      for (int i = 0; i < 10; i++)
      {
         journalImpl.appendAddRecordTransactional(1l, i, (byte)0, new SimpleEncoding(1, (byte)15));
      }

      for (int i = 10; i < 20; i++)
      {
         journalImpl.appendAddRecordTransactional(1l, i, (byte)0, new SimpleEncoding(1, (byte)15));
      }

      journalImpl.appendCommitRecord(1l, false);

      SequentialFile file = factory.createSequentialFile("tt-1.tt", 1);
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      Assert.assertEquals(0, records.size());
      Assert.assertEquals(0, transactions.size());

      for (int i = 0; i < 10; i++)
      {
         journalImpl.appendAddRecordTransactional(1l, i, (byte)0, new SimpleEncoding(1, (byte)15));
      }

      journalImpl.forceMoveNextFile();
      SimpleEncoding xidEncoding = new SimpleEncoding(10, (byte)'a');

      journalImpl.appendPrepareRecord(1l, xidEncoding, false);
      journalImpl.appendCommitRecord(1l, false);

      for (int i = 0; i < 10; i++)
      {
         journalImpl.appendDeleteRecordTransactional(2l, i);
      }

      journalImpl.appendCommitRecord(2l, false);
      journalImpl.appendAddRecord(100l, (byte)0, new SimpleEncoding(1, (byte)10), false); // Add
      // anything
      // to
      // keep
      // holding
      // the
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.SimpleEncoding

      {
         if (i == 10)
         {
            journalImpl.forceMoveNextFile();
         }
         journalImpl.appendAddRecordTransactional(1l, i, (byte)0, new SimpleEncoding(1, (byte)15));
      }

      journalImpl.appendCommitRecord(1l, false);

      for (int i = 0; i < 10; i++)
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.