org.jboss.messaging.core.asyncio
Interface AsynchronousFile

All Known Implementing Classes:
AsynchronousFileImpl

public interface AsynchronousFile

Author:
clebert.suconic@jboss.com

Method Summary
 void close()
           
 void destroyBuffer(java.nio.ByteBuffer buffer)
           
 void fill(long position, int blocks, long size, byte fillChar)
           
 int getBlockSize()
           
 java.nio.ByteBuffer newBuffer(long size)
           
 void open(java.lang.String fileName, int maxIO, long timeout)
          Note: If you are using a native Linux implementation, maxIO can't be higher than what's defined on /proc/sys/fs/aio-max-nr, or you would get an error
 void read(long position, long size, java.nio.ByteBuffer directByteBuffer, AIOCallback aioPackage)
           
 long size()
          Warning: This function will perform a synchronous IO, probably translating to a fstat call
 void write(long position, long size, java.nio.ByteBuffer directByteBuffer, AIOCallback aioPackage)
           
 

Method Detail

close

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

open

void open(java.lang.String fileName,
          int maxIO,
          long timeout)
Note: If you are using a native Linux implementation, maxIO can't be higher than what's defined on /proc/sys/fs/aio-max-nr, or you would get an error

Parameters:
fileName -
maxIO - The number of max concurrent asynchrnous IO operations. It has to be balanced between the size of your writes and the capacity of your disk.

size

long size()
Warning: This function will perform a synchronous IO, probably translating to a fstat call


write

void write(long position,
           long size,
           java.nio.ByteBuffer directByteBuffer,
           AIOCallback aioPackage)

read

void read(long position,
          long size,
          java.nio.ByteBuffer directByteBuffer,
          AIOCallback aioPackage)

fill

void fill(long position,
          int blocks,
          long size,
          byte fillChar)

newBuffer

java.nio.ByteBuffer newBuffer(long size)

destroyBuffer

void destroyBuffer(java.nio.ByteBuffer buffer)

getBlockSize

int getBlockSize()


Copyright © 2006 JBoss Inc. All Rights Reserved.