Package org.hornetq.core.journal

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


      FakeSequentialFileFactory factory = new FakeSequentialFileFactory(200, true);

      SequentialFile file = factory.createSequentialFile("test1", 1);

      file.open();

      try
      {
         ByteBuffer buffer = ByteBuffer.allocateDirect(200);
         for (int i = 0; i < 200; i++)
View Full Code Here


      System.out.println("Files = " + factory.listFiles("tt"));

      SequentialFile file = factory.createSequentialFile("tt-1.tt", 1);

      file.open();

      ByteBuffer buffer = ByteBuffer.allocate(100);

      // Messing up with the first record (removing the position)
      file.position(100);
View Full Code Here

      journalImpl.appendCommitRecord(2l, false);

      SequentialFile file = factory.createSequentialFile("tt-1.tt", 1);

      file.open();

      ByteBuffer buffer = ByteBuffer.allocate(100);

      // Messing up with the first record (removing the position)
      file.position(100);
View Full Code Here

      journalImpl.appendCommitRecord(1l, false);

      SequentialFile file = factory.createSequentialFile("tt-1.tt", 1);

      file.open();

      ByteBuffer buffer = ByteBuffer.allocate(100);

      // Messing up with the first record (removing the position)
      file.position(100);
View Full Code Here

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

      SequentialFile file = factory.createSequentialFile("tt-1.tt", 1);

      file.open();

      ByteBuffer buffer = ByteBuffer.allocate(100);

      // Messing up with the first record (removing the position)
      file.position(100);
View Full Code Here

            buffer.put(Byte.MAX_VALUE);
         }
        
         buffer.rewind();
        
         file.open();
        
         file.position(0);
        
         file.writeDirect(buffer, sync);
        
View Full Code Here

      long fileID = Integer.MAX_VALUE;
      for (String fileStr : files)
      {
         SequentialFile file = fileFactory.createSequentialFile(fileStr, 1);
        
         file.open();
        
         JournalImpl.initFileHeader(fileFactory, file, journal.getUserVersion(), fileID++);

         file.close();
      }
View Full Code Here

      String tmpFileName = fileName + ".tmp";

      SequentialFile sequentialFile = fileFactory.createSequentialFile(tmpFileName, maxAIO);

      sequentialFile.open(1, false);

      if (init)
      {
         sequentialFile.fill(0, fileSize, JournalImpl.FILL_CHARACTER);
View Full Code Here

      if (keepOpened)
      {
         if (multiAIO)
         {
            sequentialFile.open();
         }
         else
         {
            sequentialFile.open(1, false);
         }
View Full Code Here

         {
            sequentialFile.open();
         }
         else
         {
            sequentialFile.open(1, false);
         }
         sequentialFile.position(position);
      }

      return new JournalFileImpl(sequentialFile, fileID, JournalImpl.FORMAT_VERSION);
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.