Package org.hornetq.core.journal

Examples of org.hornetq.core.journal.RecordInfo


            switch (recordType)
            {
               case ADD_RECORD:
               {
                  reader.onReadAddRecord(new RecordInfo(recordID, userRecordType, record, false));
                  break;
               }

               case UPDATE_RECORD:
               {
                  reader.onReadUpdateRecord(new RecordInfo(recordID, userRecordType, record, true));
                  break;
               }

               case DELETE_RECORD:
               {
                  reader.onReadDeleteRecord(recordID);
                  break;
               }

               case ADD_RECORD_TX:
               {
                  reader.onReadAddRecordTX(transactionID, new RecordInfo(recordID, userRecordType, record, false));
                  break;
               }

               case UPDATE_RECORD_TX:
               {
                  reader.onReadUpdateRecordTX(transactionID, new RecordInfo(recordID, userRecordType, record, true));
                  break;
               }

               case DELETE_RECORD_TX:
               {
                  reader.onReadDeleteRecordTX(transactionID, new RecordInfo(recordID, (byte)0, record, true));
                  break;
               }

               case PREPARE_RECORD:
               {
View Full Code Here


               // Clean up when the list is too large, or it won't be possible to load large sets of files
               // Done as part of JBMESSAGING-1678
               Iterator<RecordInfo> iter = records.iterator();
               while (iter.hasNext())
               {
                  RecordInfo record = iter.next();

                  if (recordsToDelete.contains(record.id))
                  {
                     iter.remove();
                  }
View Full Code Here

            long percent = (long)((((double)reccount) / ((double)totalSize)) * 100f);
           
            log.info(percent + "% loaded");
         }
        
         RecordInfo record = records.get(reccount);
         byte[] data = record.data;

         HornetQBuffer buff = HornetQBuffers.wrappedBuffer(data);

         byte recordType = record.getUserRecordType();

         switch (recordType)
         {
            case ADD_LARGE_MESSAGE:
            {
View Full Code Here

         {
            operation = lineProperties.getProperty("operation");

            if (operation.equals("AddRecord"))
            {
               RecordInfo info = parseRecord(lineProperties);
               journal.appendAddRecord(info.id, info.userRecordType, info.data, false);
            }
            else if (operation.equals("AddRecordTX"))
            {
               long txID = parseLong("txID", lineProperties);
               AtomicInteger counter = getCounter(txID, txCounters);
               counter.incrementAndGet();
               RecordInfo info = parseRecord(lineProperties);
               journal.appendAddRecordTransactional(txID, info.id, info.userRecordType, info.data);
            }
            else if (operation.equals("AddRecordTX"))
            {
               long txID = parseLong("txID", lineProperties);
               AtomicInteger counter = getCounter(txID, txCounters);
               counter.incrementAndGet();
               RecordInfo info = parseRecord(lineProperties);
               journal.appendAddRecordTransactional(txID, info.id, info.userRecordType, info.data);
            }
            else if (operation.equals("UpdateTX"))
            {
               long txID = parseLong("txID", lineProperties);
               AtomicInteger counter = getCounter(txID, txCounters);
               counter.incrementAndGet();
               RecordInfo info = parseRecord(lineProperties);
               journal.appendUpdateRecordTransactional(txID, info.id, info.userRecordType, info.data);
            }
            else if (operation.equals("Update"))
            {
               RecordInfo info = parseRecord(lineProperties);
               journal.appendUpdateRecord(info.id, info.userRecordType, info.data, false);
            }
            else if (operation.equals("DeleteRecord"))
            {
               long id = parseLong("id", lineProperties);
View Full Code Here

   {
      int id = parseInt("id", properties);
      byte userRecordType = parseByte("userRecordType", properties);
      boolean isUpdate = parseBoolean("isUpdate", properties);
      byte[] data = parseEncoding("data", properties);
      return new RecordInfo(id, userRecordType, data, isUpdate);
   }
View Full Code Here

      {
         byte[] record = generateRecord(RandomUtil.randomInterval(1500, 10000));

         journal.appendAddRecord(i, (byte)0, record, false);

         records.add(new RecordInfo(i, (byte)0, record, false, (short)0));
      }

      for (int i = 0; i < 100; i++)
      {
         byte[] record = generateRecord(10 + RandomUtil.randomInterval(1500, 10000));

         journal.appendUpdateRecord(i, (byte)0, record, false);

         records.add(new RecordInfo(i, (byte)0, record, true, (short)0));
      }

      for (int i = 0; i < 100; i++)
      {
         journal.appendDeleteRecord(i, false);
View Full Code Here

         beforeJournalOperation();

         journal.appendAddRecord(element, (byte)0, record, sync);

         records.add(new RecordInfo(element, (byte)0, record, false, (short)0));
      }

      journal.debugWait();
   }
View Full Code Here

         beforeJournalOperation();

         journal.appendUpdateRecord(element, (byte)0, updateRecord, sync);

         records.add(new RecordInfo(element, (byte)0, updateRecord, true, (short)0));
      }

      journal.debugWait();
   }
View Full Code Here

         beforeJournalOperation();

         journal.appendAddRecordTransactional(txID, element, (byte)0, record);

         tx.records.add(new RecordInfo(element, (byte)0, record, false, (short)0));

      }

      journal.debugWait();
   }
View Full Code Here

         beforeJournalOperation();

         journal.appendUpdateRecordTransactional(txID, element, (byte)0, updateRecord);

         tx.records.add(new RecordInfo(element, (byte)0, updateRecord, true, (short)0));
      }
      journal.debugWait();
   }
View Full Code Here

TOP

Related Classes of org.hornetq.core.journal.RecordInfo

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.