public class NIOSequentialFileFactory extends AbstractSequentialFileFactory implements SequentialFileFactory
bufferSize, bufferTimeout, EXECUTOR_TIMEOUT, journalDir, timedBuffer, writeExecutor
Constructor and Description |
---|
NIOSequentialFileFactory(String journalDir) |
NIOSequentialFileFactory(String journalDir,
boolean buffered) |
NIOSequentialFileFactory(String journalDir,
boolean buffered,
int bufferSize,
int bufferTimeout,
boolean logRates) |
NIOSequentialFileFactory(String journalDir,
boolean buffered,
int bufferSize,
int bufferTimeout,
boolean logRates,
IOCriticalErrorListener listener) |
NIOSequentialFileFactory(String journalDir,
boolean buffered,
IOCriticalErrorListener listener) |
NIOSequentialFileFactory(String journalDir,
IOCriticalErrorListener listener) |
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 bytes) |
void |
clearBuffer(ByteBuffer buffer) |
SequentialFile |
createSequentialFile(String fileName,
int maxIO) |
int |
getAlignment() |
boolean |
isSupportsCallbacks() |
ByteBuffer |
newBuffer(int size)
Note: You need to release the buffer if is used for reading operations.
|
void |
releaseDirectBuffer(ByteBuffer buffer)
used for cases where you need direct buffer outside of the journal context.
|
ByteBuffer |
wrapBuffer(byte[] bytes) |
activateBuffer, createDirs, deactivateBuffer, flush, getDirectory, listFiles, onIOError, releaseBuffer, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activateBuffer, createDirs, deactivateBuffer, flush, getDirectory, listFiles, onIOError, releaseBuffer, start, stop
public NIOSequentialFileFactory(String journalDir)
public NIOSequentialFileFactory(String journalDir, IOCriticalErrorListener listener)
public NIOSequentialFileFactory(String journalDir, boolean buffered)
public NIOSequentialFileFactory(String journalDir, boolean buffered, IOCriticalErrorListener listener)
public NIOSequentialFileFactory(String journalDir, boolean buffered, int bufferSize, int bufferTimeout, boolean logRates)
public NIOSequentialFileFactory(String journalDir, boolean buffered, int bufferSize, int bufferTimeout, boolean logRates, IOCriticalErrorListener listener)
public SequentialFile createSequentialFile(String fileName, int maxIO)
createSequentialFile
in interface SequentialFileFactory
public boolean isSupportsCallbacks()
isSupportsCallbacks
in interface SequentialFileFactory
public ByteBuffer allocateDirectBuffer(int size)
SequentialFileFactory
allocateDirectBuffer
in interface SequentialFileFactory
public void releaseDirectBuffer(ByteBuffer buffer)
SequentialFileFactory
releaseDirectBuffer
in interface SequentialFileFactory
public ByteBuffer newBuffer(int size)
SequentialFileFactory
newBuffer
in interface SequentialFileFactory
public void clearBuffer(ByteBuffer buffer)
clearBuffer
in interface SequentialFileFactory
public ByteBuffer wrapBuffer(byte[] bytes)
wrapBuffer
in interface SequentialFileFactory
public int getAlignment()
getAlignment
in interface SequentialFileFactory
public int calculateBlockSize(int bytes)
calculateBlockSize
in interface SequentialFileFactory
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.