Examples of JournalInternalRecord


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

      compactingLock.readLock().lock();

      try
      {
         JournalInternalRecord addRecord = new JournalAddRecord(true, id, recordType, record);

         if (callback != null)
         {
            callback.storeLineUp();
         }

         lockAppend.lock();
         try
         {
            JournalFile usedFile = appendRecord(addRecord, false, sync, null, callback);

            if (JournalImpl.TRACE_RECORDS)
            {
               JournalImpl.traceRecord("appendAddRecord::id=" + id +
                                       ", userRecordType=" +
                                       recordType +
                                       ", usedFile = " +
                                       usedFile);
            }

            records.put(id, new JournalRecord(usedFile, addRecord.getEncodeSize()));
         }
         finally
         {
            lockAppend.unlock();
         }
View Full Code Here

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

            {
               throw new IllegalStateException("Cannot find add info " + id);
            }
         }

         JournalInternalRecord updateRecord = new JournalAddRecord(false, id, recordType, record);

         if (callback != null)
         {
            callback.storeLineUp();
         }

         lockAppend.lock();
         try
         {
            JournalFile usedFile = appendRecord(updateRecord, false, sync, null, callback);

            if (JournalImpl.TRACE_RECORDS)
            {
               JournalImpl.traceRecord("appendUpdateRecord::id=" + id +
                                       ", userRecordType=" +
                                       recordType +
                                       ", usedFile = " +
                                       usedFile);
            }

            // record== null here could only mean there is a compactor, and computing the delete should be done after
            // compacting is done
            if (jrnRecord == null)
            {
               compactor.addCommandUpdate(id, usedFile, updateRecord.getEncodeSize());
            }
            else
            {
               jrnRecord.addUpdateFile(usedFile, updateRecord.getEncodeSize());
            }
         }
         finally
         {
            lockAppend.unlock();
View Full Code Here

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

            {
               throw new IllegalStateException("Cannot find add info " + id + " on compactor or current records");
            }
         }

         JournalInternalRecord deleteRecord = new JournalDeleteRecord(id);

         if (callback != null)
         {
            callback.storeLineUp();
         }
View Full Code Here

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

      compactingLock.readLock().lock();

      try
      {
         JournalInternalRecord addRecord = new JournalAddRecordTX(true, txID, id, recordType, record);

         JournalTransaction tx = getTransactionInfo(txID);

         lockAppend.lock();
         try
         {
            JournalFile usedFile = appendRecord(addRecord, false, false, tx, null);

            if (JournalImpl.TRACE_RECORDS)
            {
               JournalImpl.traceRecord("appendAddRecordTransactional:txID=" + txID +
                                       ",id=" +
                                       id +
                                       ", userRecordType=" +
                                       recordType +
                                       ", usedFile = " +
                                       usedFile);
            }

            tx.addPositive(usedFile, id, addRecord.getEncodeSize());
         }
         finally
         {
            lockAppend.unlock();
         }
View Full Code Here

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

      compactingLock.readLock().lock();

      try
      {
         JournalInternalRecord updateRecordTX = new JournalAddRecordTX(false, txID, id, recordType, record);

         JournalTransaction tx = getTransactionInfo(txID);

         lockAppend.lock();
         try
         {
            JournalFile usedFile = appendRecord(updateRecordTX, false, false, tx, null);

            if (JournalImpl.TRACE_RECORDS)
            {
               JournalImpl.traceRecord("appendUpdateRecordTransactional::txID=" + txID +
                                       ",id=" +
                                       id +
                                       ", userRecordType=" +
                                       recordType +
                                       ", usedFile = " +
                                       usedFile);
            }

            tx.addPositive(usedFile, id, updateRecordTX.getEncodeSize());
         }
         finally
         {
            lockAppend.unlock();
         }
View Full Code Here

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

      compactingLock.readLock().lock();

      try
      {
         JournalInternalRecord deleteRecordTX = new JournalDeleteRecordTX(txID, id, record);

         JournalTransaction tx = getTransactionInfo(txID);

         lockAppend.lock();
         try
View Full Code Here

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

      JournalTransaction tx = getTransactionInfo(txID);

      try
      {

         JournalInternalRecord prepareRecord = new JournalCompleteRecordTX(false, txID, transactionData);

         if (callback != null)
         {
            callback.storeLineUp();
         }
View Full Code Here

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

         if (tx == null)
         {
            throw new IllegalStateException("Cannot find tx with id " + txID);
         }

         JournalInternalRecord commitRecord = new JournalCompleteRecordTX(true, txID, null);

         if (callback != null)
         {
            callback.storeLineUp();
         }
View Full Code Here

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

         if (tx == null)
         {
            throw new IllegalStateException("Cannot find tx with id " + txID);
         }

         JournalInternalRecord rollbackRecord = new JournalRollbackRecordTX(txID);

         if (callback != null)
         {
            callback.storeLineUp();
         }
View Full Code Here

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

         {
            lockAppend.lock();

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

            JournalInternalRecord blastRecord = new JournalInternalRecord()
            {

               @Override
               public int getEncodeSize()
               {
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.