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, critialErrorListener, criticalAnalyzer, 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,
CriticalAnalyzer analyzer) |
AIOSequentialFileFactory(File journalDir,
IOCriticalErrorListener listener,
int maxIO) |
Modifier and Type | Method and Description |
---|---|
void |
afterClose() |
ByteBuffer |
allocateDirectBuffer(int size)
used for cases where you need direct buffer outside of the journal context.
|
void |
beforeClose() |
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.
|
ByteBuffer |
newBuffer(int size,
boolean zeroed)
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, getBufferSize, getCriticalAnalyzer, getDirectory, getMaxIO, isDatasync, listFiles, onIOError, setAlignment, setDatasync
public 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, CriticalAnalyzer analyzer)
public void beforeClose()
public void afterClose()
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)
SequentialFileFactory
public void releaseDirectBuffer(ByteBuffer buffer)
SequentialFileFactory
public ByteBuffer newBuffer(int size)
SequentialFileFactory
public ByteBuffer newBuffer(int size, boolean zeroed)
SequentialFileFactory
zeroed
- if true
the returned ByteBuffer
must be zeroed, otherwise it tries to save zeroing it.public void clearBuffer(ByteBuffer directByteBuffer)
public int getAlignment()
getAlignment
in interface SequentialFileFactory
getAlignment
in class AbstractSequentialFileFactory
public ByteBuffer wrapBuffer(byte[] bytes)
public int calculateBlockSize(int position)
public void releaseBuffer(ByteBuffer buffer)
releaseBuffer
in interface SequentialFileFactory
releaseBuffer
in class AbstractSequentialFileFactory
public void start()
start
in interface SequentialFileFactory
start
in class AbstractSequentialFileFactory
public void stop()
stop
in interface SequentialFileFactory
stop
in class AbstractSequentialFileFactory
Copyright © 2021 JBoss by Red Hat. All rights reserved.