Package org.hornetq.core.journal

Examples of org.hornetq.core.journal.SequentialFile.writeDirect()


      buffer.rewind();

      // Changing the check bufferSize, so reload will ignore this record
      file.position(100);

      file.writeDirect(buffer, true);

      file.close();

      setupAndLoadJournal(JOURNAL_SIZE, 100);
View Full Code Here


      // Messing up with the first record (changing the fileID, so Journal
      // reload will think the record came from a different journal usage)
      file.position(100);

      buffer.rewind();
      file.writeDirect(buffer, true);

      file.close();

      setupAndLoadJournal(JOURNAL_SIZE, 100);
View Full Code Here

      // Messing up with the first record (changing the fileID, so Journal
      // reload will think the record came from a different journal usage)
      file.position(100);

      file.writeDirect(buffer, true);

      file.close();

      setupAndLoadJournal(JOURNAL_SIZE, 100);
View Full Code Here

         file.open();

         file.position(0);

         file.writeDirect(buffer, sync);

         file.close();
      }

      fileFactory.stop();
View Full Code Here

         writeBuffer.put(renameBuffer.toByteBuffer().array(), 0, renameBuffer.writerIndex());

         writeBuffer.rewind();

         controlFile.writeDirect(writeBuffer, true);

         return controlFile;
      }
      finally
      {
View Full Code Here

               start = System.currentTimeMillis();
            }

            bb1.rewind();

            file.writeDirect(bb1, true);
         }

         long end = System.currentTimeMillis();

         double rate = 1000 * (double)its / (end - start);
View Full Code Here

            {
               for (int i = 0; i < its; i++)
               {
                  bb1.rewind();

                  file.writeDirect(bb1, true, task);
                  // try
                  // {
                  // file.writeDirect(bb1, true);
                  // }
                  // catch (Exception e)
View Full Code Here

      if (!channel.isOpen())
      {
         channel.open(1, false);
      }
      channel.writeDirect(ByteBuffer.wrap(data), true);
   }

   /**
    * Reserves files (with the given fileID) in the specified journal, and places a
    * {@link FileWrapperJournal} in place to store messages while synchronization is going on.
View Full Code Here

      if (!channel.isOpen())
      {
         channel.open(1, false);
      }
      channel.writeDirect(ByteBuffer.wrap(data), true);
   }

   /**
    * Reserves files (with the given fileID) in the specified journal, and places a
    * {@link FileWrapperJournal} in place to store messages while synchronization is going on.
View Full Code Here

               start = System.currentTimeMillis();
            }

            bb1.rewind();

            file.writeDirect(bb1, true);
         }

         long end = System.currentTimeMillis();

         double rate = 1000 * (double)its / (end - start);
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.