org.jboss.messaging.core.journal.impl
Class AIOSequentialFile

java.lang.Object
  extended by org.jboss.messaging.core.journal.impl.AIOSequentialFile
All Implemented Interfaces:
SequentialFile

public class AIOSequentialFile
extends java.lang.Object
implements SequentialFile

A AIOSequentialFile

Author:
Clebert Suconic

Constructor Summary
AIOSequentialFile(java.lang.String journalDir, java.lang.String fileName, int maxIO, long timeout)
           
 
Method Summary
 int calculateBlockStart(int position)
           
 void close()
           
 void delete()
           
 void fill(int position, int size, byte fillCharacter)
           
 int getAlignment()
           
 java.lang.String getFileName()
           
 void open()
           
 void position(int pos)
           
 int read(java.nio.ByteBuffer bytes)
           
 int read(java.nio.ByteBuffer bytes, IOCallback callback)
           
 int write(java.nio.ByteBuffer bytes, boolean sync)
           
 int write(java.nio.ByteBuffer bytes, IOCallback callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AIOSequentialFile

public AIOSequentialFile(java.lang.String journalDir,
                         java.lang.String fileName,
                         int maxIO,
                         long timeout)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getAlignment

public int getAlignment()
                 throws java.lang.Exception
Specified by:
getAlignment in interface SequentialFile
Throws:
java.lang.Exception

calculateBlockStart

public int calculateBlockStart(int position)
                        throws java.lang.Exception
Specified by:
calculateBlockStart in interface SequentialFile
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Specified by:
close in interface SequentialFile
Throws:
java.lang.Exception

delete

public void delete()
            throws java.lang.Exception
Specified by:
delete in interface SequentialFile
Throws:
java.lang.Exception

fill

public void fill(int position,
                 int size,
                 byte fillCharacter)
          throws java.lang.Exception
Specified by:
fill in interface SequentialFile
Throws:
java.lang.Exception

getFileName

public java.lang.String getFileName()
Specified by:
getFileName in interface SequentialFile

open

public void open()
          throws java.lang.Exception
Specified by:
open in interface SequentialFile
Throws:
java.lang.Exception

position

public void position(int pos)
              throws java.lang.Exception
Specified by:
position in interface SequentialFile
Throws:
java.lang.Exception

read

public int read(java.nio.ByteBuffer bytes,
                IOCallback callback)
         throws java.lang.Exception
Specified by:
read in interface SequentialFile
Throws:
java.lang.Exception

read

public int read(java.nio.ByteBuffer bytes)
         throws java.lang.Exception
Specified by:
read in interface SequentialFile
Throws:
java.lang.Exception

write

public int write(java.nio.ByteBuffer bytes,
                 IOCallback callback)
          throws java.lang.Exception
Specified by:
write in interface SequentialFile
Throws:
java.lang.Exception

write

public int write(java.nio.ByteBuffer bytes,
                 boolean sync)
          throws java.lang.Exception
Specified by:
write in interface SequentialFile
Throws:
java.lang.Exception


Copyright © 2006 JBoss Inc. All Rights Reserved.