public interface SequentialFileFactory
Modifier and Type | Method and Description |
---|---|
void |
activateBuffer(SequentialFile file) |
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) |
void |
createDirs()
Create the directory if it doesn't exist yet
|
SequentialFile |
createSequentialFile(String fileName,
int maxIO) |
void |
deactivateBuffer() |
void |
flush() |
int |
getAlignment() |
String |
getDirectory() |
boolean |
isSupportsCallbacks() |
List<String> |
listFiles(String extension) |
ByteBuffer |
newBuffer(int size)
Note: You need to release the buffer if is used for reading operations.
|
void |
onIOError(int errorCode,
String message,
SequentialFile file)
The SequentialFile will call this method when a disk IO Error happens during the live phase.
|
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() |
ByteBuffer |
wrapBuffer(byte[] bytes) |
SequentialFile createSequentialFile(String fileName, int maxIO)
boolean isSupportsCallbacks()
void onIOError(int errorCode, String message, SequentialFile file)
ByteBuffer allocateDirectBuffer(int size)
void releaseDirectBuffer(ByteBuffer buffer)
ByteBuffer newBuffer(int size)
size
- void releaseBuffer(ByteBuffer buffer)
void activateBuffer(SequentialFile file)
void deactivateBuffer()
ByteBuffer wrapBuffer(byte[] bytes)
int getAlignment()
int calculateBlockSize(int bytes)
String getDirectory()
void clearBuffer(ByteBuffer buffer)
void start()
void stop()
void createDirs() throws Exception
Exception
void flush()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.