|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsynchronousFile
Method Summary | |
---|---|
void |
close()
|
void |
fill(long position,
int blocks,
long size,
byte fillChar)
|
int |
getBlockSize()
|
java.lang.String |
getFileName()
|
void |
open(java.lang.String fileName,
int maxIO)
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 aioCallback)
|
void |
setBufferCallback(BufferCallback callback)
|
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 aioCallback)
Any error will be reported on the callback interface |
Method Detail |
---|
void close() throws java.lang.Exception
java.lang.Exception
void open(java.lang.String fileName, int maxIO) throws MessagingException
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.
MessagingException
long size() throws MessagingException
MessagingException
void write(long position, long size, java.nio.ByteBuffer directByteBuffer, AIOCallback aioCallback)
void read(long position, long size, java.nio.ByteBuffer directByteBuffer, AIOCallback aioCallback) throws MessagingException
MessagingException
void fill(long position, int blocks, long size, byte fillChar) throws MessagingException
MessagingException
void setBufferCallback(BufferCallback callback)
int getBlockSize()
java.lang.String getFileName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |