public interface AsynchronousFile
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
fill(long position,
int blocks,
long size,
byte fillChar) |
int |
getBlockSize() |
String |
getFileName() |
void |
open(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,
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,
ByteBuffer directByteBuffer,
AIOCallback aioCallback)
Any error will be reported on the callback interface
|
void |
writeInternal(long positionToWrite,
long size,
ByteBuffer bytes)
Performs an internal direct write.
|
void open(String fileName, int maxIO) throws HornetQException
fileName
- maxIO
- The number of max concurrent asynchronous IO operations. It has to be balanced between the size of your writes and the capacity of your disk.HornetQException
long size() throws HornetQException
HornetQException
void write(long position, long size, ByteBuffer directByteBuffer, AIOCallback aioCallback)
void writeInternal(long positionToWrite, long size, ByteBuffer bytes) throws HornetQException
HornetQException
void read(long position, long size, ByteBuffer directByteBuffer, AIOCallback aioCallback) throws HornetQException
HornetQException
void fill(long position, int blocks, long size, byte fillChar) throws HornetQException
HornetQException
void setBufferCallback(BufferCallback callback)
int getBlockSize()
String getFileName()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.