activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [2/9] activemq-artemis git commit: ARTEMIS-163 First pass on the native AIO refactoring
Date Thu, 30 Jul 2015 09:14:24 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
index 2dc0d38..e49e50b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOImportExportTest.java
@@ -16,8 +16,8 @@
  */
 package org.apache.activemq.artemis.tests.integration.journal;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.junit.BeforeClass;
 
 public class AIOImportExportTest extends NIOImportExportTest
@@ -31,6 +31,6 @@ public class AIOImportExportTest extends NIOImportExportTest
    @Override
    protected SequentialFileFactory getFileFactory() throws Exception
    {
-      return new AIOSequentialFileFactory(getTestDirfile());
+      return new AIOSequentialFileFactory(getTestDirfile(), 10);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
index 39972e7..f1ce785 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalCompactTest.java
@@ -19,8 +19,8 @@ package org.apache.activemq.artemis.tests.integration.journal;
 import java.io.File;
 
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.JournalConstants;
 import org.junit.BeforeClass;
 
@@ -43,7 +43,7 @@ public class AIOJournalCompactTest extends NIOJournalCompactTest
 
       return new AIOSequentialFileFactory(getTestDirfile(),
                                           JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
-                                          100000,
+                                          100000, 10,
                                           false);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
index acbaac4..59f6b95 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOJournalImplTest.java
@@ -17,10 +17,10 @@
 package org.apache.activemq.artemis.tests.integration.journal;
 import java.io.File;
 
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.JournalConstants;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestUnit;
 import org.junit.Assert;
 import org.junit.Before;
@@ -48,7 +48,7 @@ public class AIOJournalImplTest extends JournalImplTestUnit
    public void setUp() throws Exception
    {
       super.setUp();
-      if (!AsynchronousFileImpl.isLoaded())
+      if (!LibaioContext.isLoaded())
       {
          Assert.fail(String.format("libAIO is not loaded on %s %s %s",
                                    System.getProperty("os.name"),
@@ -67,7 +67,7 @@ public class AIOJournalImplTest extends JournalImplTestUnit
       file.mkdir();
 
       return new AIOSequentialFileFactory(getTestDirfile(),
-            JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO, 1000000,
+            JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO, 1000000, 10,
             false);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
index 072c820..acc65b1 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
@@ -19,9 +19,9 @@ import java.io.File;
 import java.nio.ByteBuffer;
 
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.SequentialFileFactoryTestBase;
-import org.apache.activemq.artemis.core.journal.SequentialFile;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFile;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -38,13 +38,13 @@ public class AIOSequentialFileFactoryTest extends SequentialFileFactoryTestBase
    @Override
    protected SequentialFileFactory createFactory(String folder)
    {
-      return new AIOSequentialFileFactory(new File(folder));
+      return new AIOSequentialFileFactory(new File(folder), 10);
    }
 
    @Test
    public void testBuffer() throws Exception
    {
-      SequentialFile file = factory.createSequentialFile("filtetmp.log", 10);
+      SequentialFile file = factory.createSequentialFile("filtetmp.log");
       file.open();
       ByteBuffer buff = factory.newBuffer(10);
       Assert.assertEquals(512, buff.limit());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
index 1a69dab..c4b1acc 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOBufferedJournalCompactTest.java
@@ -19,8 +19,8 @@ package org.apache.activemq.artemis.tests.integration.journal;
 import java.io.File;
 
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 
 public class NIOBufferedJournalCompactTest extends NIOJournalCompactTest
 {
@@ -34,7 +34,7 @@ public class NIOBufferedJournalCompactTest extends NIOJournalCompactTest
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDirfile(), true);
+      return new NIOSequentialFileFactory(getTestDirfile(), true, 1);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
index d581644..e50143a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOImportExportTest.java
@@ -17,8 +17,8 @@
 package org.apache.activemq.artemis.tests.integration.journal;
 
 import org.apache.activemq.artemis.core.journal.EncodingSupport;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding;
 import org.junit.Test;
@@ -32,7 +32,7 @@ public class NIOImportExportTest extends JournalImplTestBase
    @Override
    protected SequentialFileFactory getFileFactory() throws Exception
    {
-      return new NIOSequentialFileFactory(getTestDirfile(), true);
+      return new NIOSequentialFileFactory(getTestDirfile(), true, 1);
    }
 
    // Constants -----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
index 3e42498..c3148bb 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java
@@ -31,18 +31,18 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.activemq.artemis.api.core.Pair;
+import org.apache.activemq.artemis.core.io.IOCallback;
 import org.apache.activemq.artemis.core.config.Configuration;
-import org.apache.activemq.artemis.core.journal.IOAsyncTask;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFile;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFile;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.AbstractJournalUpdateTask;
 import org.apache.activemq.artemis.core.journal.impl.JournalCompactor;
 import org.apache.activemq.artemis.core.journal.impl.JournalFile;
 import org.apache.activemq.artemis.core.journal.impl.JournalFileImpl;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager;
 import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl;
 import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl;
@@ -72,7 +72,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase
 
       for (int i = 0; i < 5; i++)
       {
-         SequentialFile file = fileFactory.createSequentialFile("file-" + i + ".tst", 1);
+         SequentialFile file = fileFactory.createSequentialFile("file-" + i + ".tst");
          dataFiles.add(new JournalFileImpl(file, 0, JournalImpl.FORMAT_VERSION));
       }
 
@@ -80,7 +80,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase
 
       for (int i = 0; i < 3; i++)
       {
-         SequentialFile file = fileFactory.createSequentialFile("file-" + i + ".tst.new", 1);
+         SequentialFile file = fileFactory.createSequentialFile("file-" + i + ".tst.new");
          newFiles.add(new JournalFileImpl(file, 0, JournalImpl.FORMAT_VERSION));
       }
 
@@ -1825,7 +1825,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase
 
                   storage.commit(tx);
 
-                  ctx.executeOnCompletion(new IOAsyncTask()
+                  ctx.executeOnCompletion(new IOCallback()
                   {
                      public void onError(int errorCode, String errorMessage)
                      {
@@ -1939,7 +1939,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase
    @Override
    protected SequentialFileFactory getFileFactory() throws Exception
    {
-      return new NIOSequentialFileFactory(getTestDirfile());
+      return new NIOSequentialFileFactory(getTestDirfile(), 1);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
index ad7671f..b4ff147 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalImplTest.java
@@ -21,8 +21,8 @@ import java.io.File;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestUnit;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 
 public class NIOJournalImplTest extends JournalImplTestUnit
 {
@@ -39,7 +39,7 @@ public class NIOJournalImplTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDirfile(), true);
+      return new NIOSequentialFileFactory(getTestDirfile(), true, 1);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
index 059bf59..d82b28c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONoBufferJournalImplTest.java
@@ -19,8 +19,8 @@ package org.apache.activemq.artemis.tests.integration.journal;
 import java.io.File;
 
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestUnit;
 
 public class NIONoBufferJournalImplTest extends JournalImplTestUnit
@@ -38,7 +38,7 @@ public class NIONoBufferJournalImplTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(new File(getTestDir()), false);
+      return new NIOSequentialFileFactory(new File(getTestDir()), false, 1);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
index 717d03c..2072300 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
@@ -17,8 +17,8 @@
 package org.apache.activemq.artemis.tests.integration.journal;
 import java.io.File;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.SequentialFileFactoryTestBase;
 
 public class NIONonBufferedSequentialFileFactoryTest extends SequentialFileFactoryTestBase
@@ -27,7 +27,7 @@ public class NIONonBufferedSequentialFileFactoryTest extends SequentialFileFacto
    @Override
    protected SequentialFileFactory createFactory(String folder)
    {
-      return new NIOSequentialFileFactory(new File(folder), false);
+      return new NIOSequentialFileFactory(new File(folder), false, 1);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
index 1ca667b..bcab8e6 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOSequentialFileFactoryTest.java
@@ -17,8 +17,8 @@
 package org.apache.activemq.artemis.tests.integration.journal;
 import java.io.File;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.SequentialFileFactoryTestBase;
 
 public class NIOSequentialFileFactoryTest extends SequentialFileFactoryTestBase
@@ -27,7 +27,7 @@ public class NIOSequentialFileFactoryTest extends SequentialFileFactoryTestBase
    @Override
    protected SequentialFileFactory createFactory(String folder)
    {
-      return new NIOSequentialFileFactory(new File(folder), true);
+      return new NIOSequentialFileFactory(new File(folder), true, 1);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
index 5e8587d..7cebc4f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java
@@ -20,17 +20,17 @@ import java.nio.ByteBuffer;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.util.SpawnedVMSupport;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.journal.LoaderCallback;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.JournalConstants;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -126,7 +126,7 @@ public class ValidateTransactionHealthTest extends ActiveMQTestBase
    {
       try
       {
-         if (type.equals("aio") && !AsynchronousFileImpl.isLoaded())
+         if (type.equals("aio") && !LibaioContext.isLoaded())
          {
             // Using System.out as this output will go towards junit report
             System.out.println("AIO not found, test being ignored on this platform");
@@ -381,15 +381,16 @@ public class ValidateTransactionHealthTest extends ActiveMQTestBase
          return new AIOSequentialFileFactory(new File(directory),
                                              JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
                                              JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
+                                             10,
                                              false);
       }
       else if (factoryType.equals("nio2"))
       {
-         return new NIOSequentialFileFactory(new File(directory), true);
+         return new NIOSequentialFileFactory(new File(directory), true, 1);
       }
       else
       {
-         return new NIOSequentialFileFactory(new File(directory), false);
+         return new NIOSequentialFileFactory(new File(directory), false, 1);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
index c8f5d8b..22c9628 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java
@@ -16,6 +16,10 @@
  */
 package org.apache.activemq.artemis.tests.integration.management;
 
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+import java.util.HashMap;
+
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
@@ -32,7 +36,6 @@ import org.apache.activemq.artemis.api.core.management.DivertControl;
 import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
 import org.apache.activemq.artemis.api.core.management.QueueControl;
 import org.apache.activemq.artemis.api.core.management.RoleInfo;
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.messagecounter.impl.MessageCounterManagerImpl;
 import org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory;
@@ -41,6 +44,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.core.settings.impl.SlowConsumerPolicy;
 import org.apache.activemq.artemis.core.transaction.impl.XidImpl;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 import org.apache.activemq.artemis.utils.json.JSONArray;
@@ -49,10 +53,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import java.util.HashMap;
-
 public class ActiveMQServerControlTest extends ManagementTestBase
 {
 
@@ -118,7 +118,7 @@ public class ActiveMQServerControlTest extends ManagementTestBase
       Assert.assertEquals(conf.isJournalSyncNonTransactional(), serverControl.isJournalSyncNonTransactional());
       Assert.assertEquals(conf.getJournalFileSize(), serverControl.getJournalFileSize());
       Assert.assertEquals(conf.getJournalMinFiles(), serverControl.getJournalMinFiles());
-      if (AsynchronousFileImpl.isLoaded())
+      if (LibaioContext.isLoaded())
       {
          Assert.assertEquals(conf.getJournalMaxIO_AIO(), serverControl.getJournalMaxIO());
          Assert.assertEquals(conf.getJournalBufferSize_AIO(), serverControl.getJournalBufferSize());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
index 2990294..d1f4755 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java
@@ -44,18 +44,18 @@ import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
+import org.apache.activemq.artemis.core.io.IOCallback;
 import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.ha.SharedStoreSlavePolicyConfiguration;
 import org.apache.activemq.artemis.core.journal.EncodingSupport;
-import org.apache.activemq.artemis.core.journal.IOAsyncTask;
 import org.apache.activemq.artemis.core.journal.IOCompletion;
 import org.apache.activemq.artemis.core.journal.Journal;
 import org.apache.activemq.artemis.core.journal.JournalLoadInformation;
 import org.apache.activemq.artemis.core.journal.LoaderCallback;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.TransactionFailureCallback;
 import org.apache.activemq.artemis.core.journal.impl.JournalFile;
 import org.apache.activemq.artemis.core.paging.PagedMessage;
@@ -377,7 +377,7 @@ public final class ReplicationTest extends ActiveMQTestBase
 
       final CountDownLatch latch = new CountDownLatch(1);
 
-      ctx.executeOnCompletion(new IOAsyncTask()
+      ctx.executeOnCompletion(new IOCallback()
       {
          public void onError(final int errorCode, final String errorMessage)
          {
@@ -402,7 +402,7 @@ public final class ReplicationTest extends ActiveMQTestBase
       final CountDownLatch latch2 = new CountDownLatch(1);
 
       // Adding the Task after the exception should still throw an exception
-      ctx.executeOnCompletion(new IOAsyncTask()
+      ctx.executeOnCompletion(new IOCallback()
       {
          public void onError(final int errorCode, final String errorMessage)
          {
@@ -426,7 +426,7 @@ public final class ReplicationTest extends ActiveMQTestBase
 
       final CountDownLatch latch3 = new CountDownLatch(1);
 
-      ctx.executeOnCompletion(new IOAsyncTask()
+      ctx.executeOnCompletion(new IOCallback()
       {
          public void onError(final int errorCode, final String errorMessage)
          {
@@ -488,7 +488,7 @@ public final class ReplicationTest extends ActiveMQTestBase
    private void blockOnReplication(final StorageManager storage, final ReplicationManager manager1) throws Exception
    {
       final CountDownLatch latch = new CountDownLatch(1);
-      storage.afterCompleteOperations(new IOAsyncTask()
+      storage.afterCompleteOperations(new IOCallback()
       {
 
          public void onError(final int errorCode, final String errorMessage)
@@ -518,7 +518,7 @@ public final class ReplicationTest extends ActiveMQTestBase
       replicatedJournal.appendPrepareRecord(1, new FakeData(), false);
 
       final CountDownLatch latch = new CountDownLatch(1);
-      storage.afterCompleteOperations(new IOAsyncTask()
+      storage.afterCompleteOperations(new IOCallback()
       {
 
          public void onError(final int errorCode, final String errorMessage)
@@ -563,7 +563,7 @@ public final class ReplicationTest extends ActiveMQTestBase
             replicatedJournal.appendPrepareRecord(i, new FakeData(), false);
          }
 
-         ctx.executeOnCompletion(new IOAsyncTask()
+         ctx.executeOnCompletion(new IOCallback()
          {
 
             public void onError(final int errorCode, final String errorMessage)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/FileLockTimeoutTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/FileLockTimeoutTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/FileLockTimeoutTest.java
index 6f4b08d..4797e23 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/FileLockTimeoutTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/FileLockTimeoutTest.java
@@ -21,9 +21,9 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfiguration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
@@ -53,7 +53,7 @@ public class FileLockTimeoutTest extends ActiveMQTestBase
       {
          Assert.assertTrue(String.format("libAIO is not loaded on %s %s %s", System.getProperty("os.name"),
                                          System.getProperty("os.arch"), System.getProperty("os.version")),
-                           AsynchronousFileImpl.isLoaded()
+                           LibaioContext.isLoaded()
          );
       }
       Configuration config = super.createDefaultInVMConfig()

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/FakeJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/FakeJournalImplTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/FakeJournalImplTest.java
index 2548b1a..a7f4210 100644
--- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/FakeJournalImplTest.java
+++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/FakeJournalImplTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.performance.journal;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
 
 /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/JournalImplTestUnit.java
----------------------------------------------------------------------
diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/JournalImplTestUnit.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/JournalImplTestUnit.java
index 11d6186..17bf397 100644
--- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/JournalImplTestUnit.java
+++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/JournalImplTestUnit.java
@@ -15,22 +15,19 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.performance.journal;
-import org.junit.After;
-
-import org.junit.Test;
-
 import java.util.ArrayList;
 
-import org.junit.Assert;
-
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.journal.Journal;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
 
 public abstract class JournalImplTestUnit extends JournalImplTestBase
 {
@@ -42,7 +39,7 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase
    {
       super.tearDown();
 
-      Assert.assertEquals(0, AsynchronousFileImpl.getTotalMaxIO());
+      Assert.assertEquals(0, LibaioContext.getTotalMaxIO());
    }
 
    @Test

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
----------------------------------------------------------------------
diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
index 7fa9e14..a73a841 100644
--- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
+++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplAIOTest.java
@@ -17,8 +17,8 @@
 package org.apache.activemq.artemis.tests.performance.journal;
 import java.io.File;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -51,7 +51,7 @@ public class RealJournalImplAIOTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDirfile());
+      return new AIOSequentialFileFactory(getTestDirfile(), 1);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
----------------------------------------------------------------------
diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
index 4d2fbcf..bc0e7c2 100644
--- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
+++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/journal/RealJournalImplNIOTest.java
@@ -18,8 +18,8 @@ package org.apache.activemq.artemis.tests.performance.journal;
 
 import java.io.File;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
 
 public class RealJournalImplNIOTest extends JournalImplTestUnit
@@ -37,7 +37,7 @@ public class RealJournalImplNIOTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new NIOSequentialFileFactory(getTestDirfile());
+      return new NIOSequentialFileFactory(getTestDirfile(), 1);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
index a3a9e1f..eddc347 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOAllPossibilitiesCompactStressTest.java
@@ -18,8 +18,8 @@ package org.apache.activemq.artemis.tests.stress.journal;
 
 import java.io.File;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.JournalConstants;
 
 public class AIOAllPossibilitiesCompactStressTest extends AllPossibilitiesCompactStressTest
@@ -53,7 +53,7 @@ public class AIOAllPossibilitiesCompactStressTest extends AllPossibilitiesCompac
 
       return new AIOSequentialFileFactory(getTestDirfile(),
                                           JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
-                                          1000000,
+                                          1000000, 1000,
                                           false);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOMultiThreadCompactorStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOMultiThreadCompactorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOMultiThreadCompactorStressTest.java
index 5b07653..b2a3129 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOMultiThreadCompactorStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AIOMultiThreadCompactorStressTest.java
@@ -16,7 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.stress.journal;
 
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.server.JournalType;
 import org.junit.BeforeClass;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
index 83ed360..7abc703 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java
@@ -23,8 +23,8 @@ import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.journal.LoaderCallback;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
 import org.junit.Assert;
 import org.junit.Test;
@@ -76,7 +76,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
    public void testInsertAndLoad() throws Exception
    {
 
-      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDirfile());
+      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDirfile(), 1000);
       JournalImpl impl = new JournalImpl(10 * 1024 * 1024,
                                          AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                                          0,
@@ -101,7 +101,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDirfile());
+      factory = new AIOSequentialFileFactory(getTestDirfile(), 1000);
       impl = new JournalImpl(10 * 1024 * 1024,
                              AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                              0,
@@ -127,7 +127,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDirfile());
+      factory = new AIOSequentialFileFactory(getTestDirfile(), 1000);
       impl = new JournalImpl(10 * 1024 * 1024,
                              AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                              0,
@@ -164,7 +164,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
    public void testInsertUpdateAndLoad() throws Exception
    {
 
-      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDirfile());
+      SequentialFileFactory factory = new AIOSequentialFileFactory(getTestDirfile(), 1000);
       JournalImpl impl = new JournalImpl(10 * 1024 * 1024,
                                          AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                                          0,
@@ -190,7 +190,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDirfile());
+      factory = new AIOSequentialFileFactory(getTestDirfile(), 1000);
       impl = new JournalImpl(10 * 1024 * 1024, 10, 0, 0, factory, "amq", "amq", 1000);
 
       impl.start();
@@ -209,7 +209,7 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase
 
       impl.stop();
 
-      factory = new AIOSequentialFileFactory(getTestDirfile());
+      factory = new AIOSequentialFileFactory(getTestDirfile(), 1000);
       impl = new JournalImpl(10 * 1024 * 1024,
                              AddAndRemoveStressTest.NUMBER_OF_FILES_ON_JOURNAL,
                              0,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/CompactingStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/CompactingStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/CompactingStressTest.java
index 60816b9..49354e4 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/CompactingStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/CompactingStressTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.artemis.tests.stress.journal;
 
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.api.core.Message;
 import org.apache.activemq.artemis.api.core.client.ClientConsumer;
@@ -24,17 +27,14 @@ import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.JournalType;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Test;
 
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicInteger;
-
 public class CompactingStressTest extends ActiveMQTestBase
 {
 
@@ -69,7 +69,7 @@ public class CompactingStressTest extends ActiveMQTestBase
    @Test
    public void testCleanupAIO() throws Throwable
    {
-      if (AsynchronousFileImpl.isLoaded())
+      if (LibaioContext.isLoaded())
       {
          internalTestCleanup(JournalType.ASYNCIO);
       }
@@ -164,7 +164,7 @@ public class CompactingStressTest extends ActiveMQTestBase
    @Test
    public void testMultiProducerAndCompactAIO() throws Throwable
    {
-      if (AsynchronousFileImpl.isLoaded())
+      if (LibaioContext.isLoaded())
       {
          internalTestMultiProducer(JournalType.ASYNCIO);
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
index 9516700..3675cd8 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java
@@ -16,26 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.stress.journal;
 
-import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
-import org.apache.activemq.artemis.core.journal.IOAsyncTask;
-import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
-import org.apache.activemq.artemis.core.journal.RecordInfo;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.TransactionFailureCallback;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
-import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl;
-import org.apache.activemq.artemis.tests.util.RandomUtil;
-import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
-import org.apache.activemq.artemis.utils.OrderedExecutorFactory;
-import org.apache.activemq.artemis.utils.SimpleIDGenerator;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -52,6 +32,26 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
+import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.core.io.IOCallback;
+import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
+import org.apache.activemq.artemis.core.journal.RecordInfo;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.journal.TransactionFailureCallback;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.apache.activemq.artemis.tests.util.RandomUtil;
+import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
+import org.apache.activemq.artemis.utils.OrderedExecutorFactory;
+import org.apache.activemq.artemis.utils.SimpleIDGenerator;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
 public class JournalCleanupCompactStressTest extends ActiveMQTestBase
 {
 
@@ -112,14 +112,14 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase
       SequentialFileFactory factory;
 
       int maxAIO;
-      if (AsynchronousFileImpl.isLoaded())
+      if (LibaioContext.isLoaded())
       {
-         factory = new AIOSequentialFileFactory(dir);
+         factory = new AIOSequentialFileFactory(dir, 10);
          maxAIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio();
       }
       else
       {
-         factory = new NIOSequentialFileFactory(dir, true);
+         factory = new NIOSequentialFileFactory(dir, true, 1);
          maxAIO = ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio();
       }
 
@@ -380,7 +380,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase
                }
                journal.appendCommitRecord(txID, true, ctx);
 
-               ctx.executeOnCompletion(new IOAsyncTask()
+               ctx.executeOnCompletion(new IOCallback()
                {
 
                   public void onError(final int errorCode, final String errorMessage)
@@ -493,7 +493,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase
       }
    }
 
-   class DeleteTask implements IOAsyncTask
+   class DeleteTask implements IOCallback
    {
       final long[] ids;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
index d351fe5..f7edebe 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java
@@ -20,9 +20,9 @@ import java.io.File;
 import java.io.FilenameFilter;
 
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.utils.ReusableLatch;
 import org.apache.activemq.artemis.utils.SimpleIDGenerator;
 import org.junit.After;
@@ -241,6 +241,6 @@ public abstract class MixupCompactorTestBase extends JournalImplTestBase
    @Override
    protected SequentialFileFactory getFileFactory() throws Exception
    {
-      return new NIOSequentialFileFactory(getTestDirfile());
+      return new NIOSequentialFileFactory(getTestDirfile(), 1);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
----------------------------------------------------------------------
diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
index 616c4a3..4ad8f4e 100644
--- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
+++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/NIOMultiThreadCompactorStressTest.java
@@ -32,14 +32,14 @@ import org.apache.activemq.artemis.api.core.client.ClientProducer;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
 import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.JournalType;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Before;
@@ -90,7 +90,7 @@ public class NIOMultiThreadCompactorStressTest extends ActiveMQTestBase
          internalTestProduceAndConsume();
          stopServer();
 
-         NIOSequentialFileFactory factory = new NIOSequentialFileFactory(new File(getJournalDir()));
+         NIOSequentialFileFactory factory = new NIOSequentialFileFactory(new File(getJournalDir()), 1);
          JournalImpl journal = new JournalImpl(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(),
                                                2,
                                                0,
@@ -339,7 +339,7 @@ public class NIOMultiThreadCompactorStressTest extends ActiveMQTestBase
 
    private void setupServer(JournalType journalType) throws Exception
    {
-      if (!AsynchronousFileImpl.isLoaded())
+      if (!LibaioContext.isLoaded())
       {
          journalType = JournalType.NIO;
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
index 385d604..717188a 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/AIOJournalImplTest.java
@@ -18,8 +18,8 @@ package org.apache.activemq.artemis.tests.timing.core.journal.impl;
 import java.io.File;
 
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.AIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
 import org.junit.BeforeClass;
 
 public class AIOJournalImplTest extends JournalImplTestUnit
@@ -39,7 +39,7 @@ public class AIOJournalImplTest extends JournalImplTestUnit
 
       file.mkdir();
 
-      return new AIOSequentialFileFactory(getTestDirfile());
+      return new AIOSequentialFileFactory(getTestDirfile(), 10);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/FakeJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/FakeJournalImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/FakeJournalImplTest.java
index 5702d9d..9e1fb68 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/FakeJournalImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/FakeJournalImplTest.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.tests.timing.core.journal.impl;
 
 import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
 
 public class FakeJournalImplTest extends JournalImplTestUnit
 {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/JournalImplTestUnit.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/JournalImplTestUnit.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/JournalImplTestUnit.java
index 0eab830..3ae3255 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/JournalImplTestUnit.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/JournalImplTestUnit.java
@@ -15,19 +15,16 @@
  * limitations under the License.
  */
 package org.apache.activemq.artemis.tests.timing.core.journal.impl;
-import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
-import org.junit.After;
-
-import org.junit.Test;
-
 import java.util.ArrayList;
 
-import org.junit.Assert;
-
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
 import org.apache.activemq.artemis.core.journal.RecordInfo;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
+import org.apache.activemq.artemis.tests.unit.core.journal.impl.JournalImplTestBase;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
 
 public abstract class JournalImplTestUnit extends JournalImplTestBase
 {
@@ -39,7 +36,7 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase
    {
       super.tearDown();
 
-      Assert.assertEquals(0, AsynchronousFileImpl.getTotalMaxIO());
+      Assert.assertEquals(0, LibaioContext.getTotalMaxIO());
    }
 
    @Test

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
----------------------------------------------------------------------
diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
index c607493..842ad3b 100644
--- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
+++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/core/journal/impl/NIOJournalImplTest.java
@@ -18,8 +18,8 @@ package org.apache.activemq.artemis.tests.timing.core.journal.impl;
 
 import java.io.File;
 
-import org.apache.activemq.artemis.core.journal.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.io.SequentialFileFactory;
+import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.tests.unit.UnitTestLogger;
 
 public class NIOJournalImplTest extends JournalImplTestUnit
@@ -31,7 +31,7 @@ public class NIOJournalImplTest extends JournalImplTestUnit
    {
       File file = new File(getTemporaryDir());
 
-      return new NIOSequentialFileFactory(file);
+      return new NIOSequentialFileFactory(file, 1);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6fe9e0eb/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
index fc17c09..adfccaa 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java
@@ -22,9 +22,10 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.artemis.api.core.ActiveMQException;
+import org.apache.activemq.artemis.core.io.IOCallback;
+import org.apache.activemq.artemis.jlibaio.LibaioContext;
+import org.apache.activemq.artemis.jlibaio.LibaioFile;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.apache.activemq.artemis.core.asyncio.AIOCallback;
-import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -37,25 +38,24 @@ public abstract class AIOTestBase extends ActiveMQTestBase
    // The AIO Test must use a local filesystem. Sometimes $HOME is on a NFS on
    // most enterprise systems
 
-   protected String fileName;
+   protected String fileName = "fileUsedOnNativeTests.log";
 
    @Override
    @Before
    public void setUp() throws Exception
    {
       super.setUp();
-      fileName = getTestDir() + "/fileUsedOnNativeTests.log";
 
       Assert.assertTrue(String.format("libAIO is not loaded on %s %s %s", System.getProperty("os.name"),
                                       System.getProperty("os.arch"), System.getProperty("os.version")),
-                        AsynchronousFileImpl.isLoaded());
+                        LibaioContext.isLoaded());
    }
 
    @Override
    @After
    public void tearDown() throws Exception
    {
-      Assert.assertEquals(0, AsynchronousFileImpl.getTotalMaxIO());
+      Assert.assertEquals(0, LibaioContext.getTotalMaxIO());
 
       super.tearDown();
    }
@@ -73,12 +73,12 @@ public abstract class AIOTestBase extends ActiveMQTestBase
 
    }
 
-   protected void preAlloc(final AsynchronousFileImpl controller, final long size) throws ActiveMQException
+   protected void preAlloc(final LibaioFile controller, final long size) throws ActiveMQException
    {
-      controller.fill(0L, 1, size, (byte)0);
+      controller.fill(size);
    }
 
-   protected static class CountDownCallback implements AIOCallback
+   protected static class CountDownCallback implements IOCallback
    {
       private final CountDownLatch latch;
 


Mime
View raw message