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

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

public class NIOSequentialFile
extends java.lang.Object
implements SequentialFile

A NIOSequentialFile

Author:
Tim Fox, Clebert Suconic

Constructor Summary
NIOSequentialFile(java.lang.String journalDir, java.lang.String fileName)
           
 
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

NIOSequentialFile

public NIOSequentialFile(java.lang.String journalDir,
                         java.lang.String fileName)
Method Detail

getAlignment

public int getAlignment()
Specified by:
getAlignment in interface SequentialFile

calculateBlockStart

public int calculateBlockStart(int position)
                        throws java.lang.Exception
Specified by:
calculateBlockStart 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

fill

public void fill(int position,
                 int size,
                 byte fillCharacter)
          throws java.lang.Exception
Specified by:
fill 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

read

public int read(java.nio.ByteBuffer bytes)
         throws java.lang.Exception
Specified by:
read 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

write

public int write(java.nio.ByteBuffer bytes,
                 boolean sync)
          throws java.lang.Exception
Specified by:
write 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

position

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


Copyright © 2006 JBoss Inc. All Rights Reserved.