[hornetq-commits] JBoss hornetq SVN: r12063 - trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Feb 1 11:49:04 EST 2012


Author: borges
Date: 2012-02-01 11:49:03 -0500 (Wed, 01 Feb 2012)
New Revision: 12063

Modified:
   trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AIOSequentialFile.java
Log:
throw the correct exceptions.

Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AIOSequentialFile.java
===================================================================
--- trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AIOSequentialFile.java	2012-02-01 16:48:48 UTC (rev 12062)
+++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AIOSequentialFile.java	2012-02-01 16:49:03 UTC (rev 12063)
@@ -25,19 +25,16 @@
 import org.hornetq.core.journal.IOAsyncTask;
 import org.hornetq.core.journal.SequentialFile;
 import org.hornetq.core.journal.SequentialFileFactory;
-import org.hornetq.core.logging.Logger;
 
 /**
- * 
+ *
  * A AIOSequentialFile
- * 
+ *
  * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
  *
  */
 public class AIOSequentialFile extends AbstractSequentialFile implements IOExceptionListener
 {
-   private static final Logger log = Logger.getLogger(AIOSequentialFile.class);
-
    private boolean opened = false;
 
    private final int maxIO;
@@ -237,7 +234,7 @@
 
    public void sync()
    {
-      throw new IllegalArgumentException("This method is not supported on AIO");
+      throw new UnsupportedOperationException("This method is not supported on AIO");
    }
 
    public long size() throws Exception
@@ -268,8 +265,8 @@
    {
       factory.onIOError(code, message, this);
    }
-   
 
+
    public void writeDirect(final ByteBuffer bytes, final boolean sync) throws Exception
    {
       if (sync)
@@ -287,7 +284,7 @@
    }
 
    /**
-    * 
+    *
     * @param sync Not used on AIO
     *  */
    public void writeDirect(final ByteBuffer bytes, final boolean sync, final IOAsyncTask callback)
@@ -299,7 +296,7 @@
       aioFile.write(positionToWrite, bytesToWrite, bytes, callback);
    }
 
-   public void writeInternal(final ByteBuffer bytes) throws Exception
+   public void writeInternal(final ByteBuffer bytes) throws HornetQException
    {
       final int bytesToWrite = factory.calculateBlockSize(bytes.limit());
 
@@ -332,5 +329,5 @@
          throw new IllegalStateException("File not opened");
       }
    }
-   
+
 }



More information about the hornetq-commits mailing list