Package org.hornetq.core.asyncio.impl

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


      try
      {
         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>();

View Full Code Here


      try
      {
         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>();

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);
View Full Code Here

         // If you call close you're supposed to wait events to finish before
         // closing it
         controller.close();
         controller.setBufferCallback(null);

         controller.open(FILE_NAME, 10);

         readBuffer = AsynchronousFileImpl.newBuffer(SIZE);

         for (int i = 0; i < NUMBER_LINES; i++)
         {
View Full Code Here

         final int NUMBER_LINES = 1000;
         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()
         {
View Full Code Here

         controller.setBufferCallback(null);

         Assert.assertEquals(0, readLatch.getCount());
         readLatch.await();
         controller.open(FILE_NAME, 10);

         ByteBuffer newBuffer = AsynchronousFileImpl.newBuffer(SIZE);

         ByteBuffer buffer = AsynchronousFileImpl.newBuffer(SIZE);
View Full Code Here

   }

   private void asyncData(final int numberOfLines, final int size, final int aioLimit) throws Exception
   {
      final AsynchronousFileImpl controller = new AsynchronousFileImpl(executor, pollerExecutor);
      controller.open(FILE_NAME, aioLimit);

      ByteBuffer buffer = null;

      try
      {
View Full Code Here

      {
         final int NUMBER_LINES = 3000;
         final int SIZE = 1024;

         final AsynchronousFileImpl controller = new AsynchronousFileImpl(executor, pollerExecutor);
         controller.open(FILE_NAME, 2000);

         buffer = AsynchronousFileImpl.newBuffer(SIZE);
         encodeBufer(buffer);

         preAlloc(controller, NUMBER_LINES * SIZE);
 
View Full Code Here

  
  
   public void testInternalWrite() throws Exception
   {
      final AsynchronousFileImpl controller = new AsynchronousFileImpl(executor, pollerExecutor);
      controller.open(FILE_NAME, 2000);

      ByteBuffer buffer = null;

      try
      {
View Full Code Here


   public void testInvalidWrite() throws Exception
   {
      final AsynchronousFileImpl controller = new AsynchronousFileImpl(executor, pollerExecutor);
      controller.open(FILE_NAME, 2000);

      ByteBuffer buffer = null;

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