public final class AIOSequentialFileFactory extends AbstractSequentialFileFactory
| Modifier and Type | Class and Description |
|---|---|
class |
AIOSequentialFileFactory.AIOSequentialCallback
The same callback is used for Runnable executor.
|
alignment, bufferSize, bufferTimeout, dataSync, EXECUTOR_TIMEOUT, journalDir, maxIO, timedBuffer, writeExecutor| Constructor and Description |
|---|
AIOSequentialFileFactory(File journalDir,
int maxIO) |
AIOSequentialFileFactory(File journalDir,
int bufferSize,
int bufferTimeout,
int maxIO,
boolean logRates) |
AIOSequentialFileFactory(File journalDir,
int bufferSize,
int bufferTimeout,
int maxIO,
boolean logRates,
IOCriticalErrorListener listener) |
AIOSequentialFileFactory(File journalDir,
IOCriticalErrorListener listener,
int maxIO) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
allocateDirectBuffer(int size)
used for cases where you need direct buffer outside of the journal context.
|
int |
calculateBlockSize(int position) |
void |
clearBuffer(ByteBuffer directByteBuffer) |
SequentialFile |
createSequentialFile(String fileName) |
void |
disableBufferReuse() |
void |
enableBufferReuse() |
int |
getAlignment() |
AIOSequentialFileFactory.AIOSequentialCallback |
getCallback() |
static boolean |
isSupported() |
static boolean |
isSupported(File journalPath) |
boolean |
isSupportsCallbacks() |
ByteBuffer |
newBuffer(int size)
Note: You need to release the buffer if is used for reading operations.
|
void |
releaseBuffer(ByteBuffer buffer) |
void |
releaseDirectBuffer(ByteBuffer buffer)
used for cases where you need direct buffer outside of the journal context.
|
void |
start() |
void |
stop() |
String |
toString() |
ByteBuffer |
wrapBuffer(byte[] bytes) |
activateBuffer, createDirs, deactivateBuffer, flush, getDirectory, getMaxIO, isDatasync, listFiles, onIOError, setAlignment, setDatasyncpublic AIOSequentialFileFactory(File journalDir, int maxIO)
public AIOSequentialFileFactory(File journalDir, IOCriticalErrorListener listener, int maxIO)
public AIOSequentialFileFactory(File journalDir, int bufferSize, int bufferTimeout, int maxIO, boolean logRates)
public AIOSequentialFileFactory(File journalDir, int bufferSize, int bufferTimeout, int maxIO, boolean logRates, IOCriticalErrorListener listener)
public AIOSequentialFileFactory.AIOSequentialCallback getCallback()
public void enableBufferReuse()
public void disableBufferReuse()
public SequentialFile createSequentialFile(String fileName)
public boolean isSupportsCallbacks()
public static boolean isSupported()
public static boolean isSupported(File journalPath)
public ByteBuffer allocateDirectBuffer(int size)
SequentialFileFactorypublic void releaseDirectBuffer(ByteBuffer buffer)
SequentialFileFactorypublic ByteBuffer newBuffer(int size)
SequentialFileFactorypublic void clearBuffer(ByteBuffer directByteBuffer)
public int getAlignment()
getAlignment in interface SequentialFileFactorygetAlignment in class AbstractSequentialFileFactorypublic ByteBuffer wrapBuffer(byte[] bytes)
public int calculateBlockSize(int position)
public void releaseBuffer(ByteBuffer buffer)
releaseBuffer in interface SequentialFileFactoryreleaseBuffer in class AbstractSequentialFileFactorypublic void start()
start in interface SequentialFileFactorystart in class AbstractSequentialFileFactorypublic void stop()
stop in interface SequentialFileFactorystop in class AbstractSequentialFileFactoryCopyright © 2018 JBoss by Red Hat. All rights reserved.