Package org.hornetq.core.journal.impl.dataformat

Examples of org.hornetq.core.journal.impl.dataformat.ByteArrayEncoding


   public void appendUpdateRecordTransactional(final long txID,
                                               final long id,
                                               final byte recordType,
                                               final byte[] record) throws Exception
   {
      appendUpdateRecordTransactional(txID, id, recordType, new ByteArrayEncoding(record));
   }
View Full Code Here


      }
   }

   public void appendDeleteRecordTransactional(final long txID, final long id, final byte[] record) throws Exception
   {
      appendDeleteRecordTransactional(txID, id, new ByteArrayEncoding(record));
   }
View Full Code Here

   public void appendPrepareRecord(final long txID,
                                   final byte[] transactionData,
                                   final boolean sync,
                                   final IOCompletion completion) throws Exception
   {
      appendPrepareRecord(txID, new ByteArrayEncoding(transactionData), sync, completion);
   }
View Full Code Here

   /* (non-Javadoc)
    * @see org.hornetq.core.journal.Journal#appendPrepareRecord(long, byte[], boolean)
    */
   public void appendPrepareRecord(final long txID, final byte[] transactionData, final boolean sync) throws Exception
   {
      appendPrepareRecord(txID, new ByteArrayEncoding(transactionData), sync);
   }
View Full Code Here

      {
         lockAppend.lock();
         try
         {

            final ByteArrayEncoding byteEncoder = new ByteArrayEncoding(new byte[128 * 1024]);

            JournalInternalRecord blastRecord = new JournalInternalRecord()
            {

               @Override
               public int getEncodeSize()
               {
                  return byteEncoder.getEncodeSize();
               }

               public void encode(final HornetQBuffer buffer)
               {
                  byteEncoder.encode(buffer);
               }
            };

            for (int i = 0; i < pages; i++)
            {
View Full Code Here

      if (lookupRecord(info.id))
      {
         JournalInternalRecord addRecord = new JournalAddRecord(true,
                                                                info.id,
                                                                info.getUserRecordType(),
                                                                new ByteArrayEncoding(info.data));
         addRecord.setCompactCount((short)(info.compactCount + 1));

         checkSize(addRecord.getEncodeSize(), info.compactCount);

         writeEncoder(addRecord);
View Full Code Here

         JournalInternalRecord record = new JournalAddRecordTX(true,
                                                               transactionID,
                                                               info.id,
                                                               info.getUserRecordType(),
                                                               new ByteArrayEncoding(info.data));

         record.setCompactCount((short)(info.compactCount + 1));

         checkSize(record.getEncodeSize(), info.compactCount);
View Full Code Here

      {
         JournalTransaction newTransaction = getNewJournalTransaction(transactionID);

         JournalInternalRecord record = new JournalDeleteRecordTX(transactionID,
                                                                  info.id,
                                                                  new ByteArrayEncoding(info.data));

         checkSize(record.getEncodeSize());

         writeEncoder(record);
View Full Code Here

      {

         JournalTransaction newTransaction = getNewJournalTransaction(transactionID);

         JournalInternalRecord prepareRecord =
                  new JournalCompleteRecordTX(TX_RECORD_TYPE.PREPARE, transactionID, new ByteArrayEncoding(extraData));

         checkSize(prepareRecord.getEncodeSize());

         writeEncoder(prepareRecord, newTransaction.getCounter(currentFile));
View Full Code Here

      if (lookupRecord(info.id))
      {
         JournalInternalRecord updateRecord = new JournalAddRecord(false,
                                                                   info.id,
                                                                   info.userRecordType,
                                                                   new ByteArrayEncoding(info.data));

         updateRecord.setCompactCount((short)(info.compactCount + 1));

         checkSize(updateRecord.getEncodeSize(), info.compactCount);
View Full Code Here

TOP

Related Classes of org.hornetq.core.journal.impl.dataformat.ByteArrayEncoding

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.