org.jboss.messaging.core.journal
Interface SequentialFile

All Known Implementing Classes:
AIOSequentialFile, NIOSequentialFile

public interface SequentialFile

A SequentialFile

Author:
Tim Fox, Clebert Suconic

Method Summary
 int calculateBlockStart(int position)
           
 void close()
           
 void delete()
           
 boolean exists()
           
 void fill(int position, int size, byte fillCharacter)
           
 boolean fits(int size)
           
 int getAlignment()
           
 java.lang.String getFileName()
           
 boolean isOpen()
           
 void lockBuffer()
           
 void open()
           
 void open(int maxIO)
          For certain operations (like loading) we don't need open the file with full maxIO
 long position()
           
 void position(long pos)
           
 int read(java.nio.ByteBuffer bytes)
           
 int read(java.nio.ByteBuffer bytes, IOCallback callback)
           
 void renameTo(java.lang.String newFileName)
           
 long size()
           
 void sync()
           
 void unlockBuffer()
           
 void waitForClose()
           
 void write(java.nio.ByteBuffer bytes, boolean sync)
           
 void write(java.nio.ByteBuffer bytes, boolean sync, IOCallback callback)
           
 void write(MessagingBuffer bytes, boolean sync)
           
 void write(MessagingBuffer bytes, boolean sync, IOCallback callback)
           
 

Method Detail

open

void open()
          throws java.lang.Exception
Throws:
java.lang.Exception

isOpen

boolean isOpen()

exists

boolean exists()

open

void open(int maxIO)
          throws java.lang.Exception
For certain operations (like loading) we don't need open the file with full maxIO

Parameters:
maxIO -
Throws:
java.lang.Exception

fits

boolean fits(int size)

getAlignment

int getAlignment()
                 throws java.lang.Exception
Throws:
java.lang.Exception

calculateBlockStart

int calculateBlockStart(int position)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getFileName

java.lang.String getFileName()

fill

void fill(int position,
          int size,
          byte fillCharacter)
          throws java.lang.Exception
Throws:
java.lang.Exception

delete

void delete()
            throws java.lang.Exception
Throws:
java.lang.Exception

write

void write(MessagingBuffer bytes,
           boolean sync,
           IOCallback callback)
           throws java.lang.Exception
Throws:
java.lang.Exception

write

void write(MessagingBuffer bytes,
           boolean sync)
           throws java.lang.Exception
Throws:
java.lang.Exception

write

void write(java.nio.ByteBuffer bytes,
           boolean sync,
           IOCallback callback)
           throws java.lang.Exception
Throws:
java.lang.Exception

write

void write(java.nio.ByteBuffer bytes,
           boolean sync)
           throws java.lang.Exception
Throws:
java.lang.Exception

read

int read(java.nio.ByteBuffer bytes,
         IOCallback callback)
         throws java.lang.Exception
Throws:
java.lang.Exception

read

int read(java.nio.ByteBuffer bytes)
         throws java.lang.Exception
Throws:
java.lang.Exception

position

void position(long pos)
              throws java.lang.Exception
Throws:
java.lang.Exception

position

long position()
              throws java.lang.Exception
Throws:
java.lang.Exception

close

void close()
           throws java.lang.Exception
Throws:
java.lang.Exception

waitForClose

void waitForClose()
                  throws java.lang.Exception
Throws:
java.lang.Exception

sync

void sync()
          throws java.lang.Exception
Throws:
java.lang.Exception

size

long size()
          throws java.lang.Exception
Throws:
java.lang.Exception

renameTo

void renameTo(java.lang.String newFileName)
              throws java.lang.Exception
Throws:
java.lang.Exception

lockBuffer

void lockBuffer()

unlockBuffer

void unlockBuffer()


Copyright © 2006 JBoss Inc. All Rights Reserved.