Examples of writeDirect()


Examples of org.apache.cassandra.io.IFileWriter.writeDirect()

    private static void writeCommitLogHeader(String commitLogFileName, byte[] bytes) throws IOException
    {    
        IFileWriter logWriter = CommitLog.createWriter(commitLogFileName);
        logWriter.seek(0L);
        /* write the commit log header */
        logWriter.writeDirect(bytes);
        logWriter.close();
    }

    private static IFileWriter createWriter(String file) throws IOException
    {       
View Full Code Here

Examples of org.apache.cassandra.io.IFileWriter.writeDirect()

    private static void writeCommitLogHeader(String commitLogFileName, byte[] bytes) throws IOException
    {    
        IFileWriter logWriter = CommitLog.createWriter(commitLogFileName);
        logWriter.seek(0L);
        /* write the commit log header */
        logWriter.writeDirect(bytes);
        logWriter.close();
    }

    private static IFileWriter createWriter(String file) throws IOException
    {       
View Full Code Here

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

      if (!channel1.isOpen())
      {
         channel1.open(1, false);
      }
      channel1.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

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

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

         writeBuffer.rewind();

         controlFile.writeDirect(writeBuffer, true);

         return controlFile;
      }
      finally
      {
View Full Code Here

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

      if (!channel1.isOpen())
      {
         channel1.open(1, false);
      }
      channel1.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

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

         buffer.put((byte)'Z');
      }

      buffer.rewind();

      file.writeDirect(buffer, true);

      impl.close();

      file = factory.createSequentialFile("00010.page", 1);
      file.open();
View Full Code Here

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

         for (int i = 0; i < 200; i++)
         {
            buffer.put(i, (byte)1);
         }

         file.writeDirect(buffer, true);

         buffer = ByteBuffer.allocate(400);
         for (int i = 0; i < 400; i++)
         {
            buffer.put(i, (byte)2);
View Full Code Here

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

         for (int i = 0; i < 400; i++)
         {
            buffer.put(i, (byte)2);
         }

         file.writeDirect(buffer, true);

         buffer = ByteBuffer.allocate(600);

         file.position(0);
View Full Code Here

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

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
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.