Package org.hornetq.core.asyncio.impl

Examples of org.hornetq.core.asyncio.impl.AsynchronousFileImpl.fill()


         final int NUMBER_LINES = 1000;
         final int SIZE = 512;

         controller.open(FILE_NAME, 1000);

         controller.fill(0, 1, NUMBER_LINES * SIZE, (byte)'j');

         final ArrayList<ByteBuffer> buffers = new ArrayList<ByteBuffer>();

         BufferCallback bufferCallback = new BufferCallback()
         {
View Full Code Here


         final int NUMBER_LINES = 1000;
         final int SIZE = 512;

         controller.open(FILE_NAME, 1000);

         controller.fill(0, 1, NUMBER_LINES * SIZE, (byte)'j');

         final ArrayList<ByteBuffer> buffers = new ArrayList<ByteBuffer>();

         BufferCallback bufferCallback = new BufferCallback()
         {
View Full Code Here

         final int NUMBER_LINES = 1000;
         final int SIZE = 1024;

         controller.open(FILE_NAME, 1000);

         controller.fill(0, 1, NUMBER_LINES * SIZE, (byte)'j');

         {
            CountDownLatch latch = new CountDownLatch(NUMBER_LINES);
            ArrayList<Integer> result = new ArrayList<Integer>();

View Full Code Here

         CountDownLatch readLatch = new CountDownLatch(NUMBER_LINES);
         final int SIZE = 1024;

         controller.open(FILE_NAME, 10000);

         controller.fill(0, 1, NUMBER_LINES * SIZE, (byte)'j');

         controller.setBufferCallback(new BufferCallback()
         {

            public void bufferDone(final ByteBuffer buffer)
View Full Code Here

      final int NUMBER_LINES = 10;
      final int SIZE = 1024;

      controller.open(FILE_NAME, 1);

      controller.fill(0, 1, NUMBER_LINES * SIZE, (byte)'j');

      Assert.assertEquals(NUMBER_LINES * SIZE, controller.size());

      controller.close();

View Full Code Here

      jlibAIO.open(FILE_NAME, 21000);
      try
      {
         MultiThreadAsynchronousFileTest.debug("Preallocating file");

         jlibAIO.fill(0l,
                      MultiThreadAsynchronousFileTest.NUMBER_OF_THREADS,
                      MultiThreadAsynchronousFileTest.SIZE * MultiThreadAsynchronousFileTest.NUMBER_OF_LINES,
                      (byte)0);
         MultiThreadAsynchronousFileTest.debug("Done Preallocating file");

View Full Code Here

      WeakReference<ByteBuffer> bufferCheck = null;
      try
      {
         controller.open(FILE_NAME, 10000);
         bufferCheck = new WeakReference<ByteBuffer>(controller.getHandler());
         controller.fill(0, 10, 1024, (byte)0);
  
         ByteBuffer write = AsynchronousFileImpl.newBuffer(1024);
  
         for (int i = 0; i < 1024; i++)
         {
View Full Code Here

         controller = new AsynchronousFileImpl(executor, pollerExecutor);

         controller.open(FILE_NAME, 10);

         controller.fill(0, 1, 512, (byte)'j');

         buffer = AsynchronousFileImpl.newBuffer(SIZE);

         buffer.clear();
View Full Code Here

      jlibAIO.open(FILE_NAME, 21000);
      try
      {
         MultiThreadAsynchronousFileTest.debug("Preallocating file");

         jlibAIO.fill(0l,
                      MultiThreadAsynchronousFileTest.NUMBER_OF_THREADS,
                      MultiThreadAsynchronousFileTest.SIZE * MultiThreadAsynchronousFileTest.NUMBER_OF_LINES,
                      (byte)0);
         MultiThreadAsynchronousFileTest.debug("Done Preallocating file");

View Full Code Here

         final int NUMBER_LINES = 1000;
         final int SIZE = 512;

         controller.open(FILE_NAME, 1000);

         controller.fill(0, 1, NUMBER_LINES * SIZE, (byte)'j');

         final ArrayList<ByteBuffer> buffers = new ArrayList<ByteBuffer>();

         BufferCallback bufferCallback = new BufferCallback()
         {
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.