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()
Creates the directory if it does not exist yet.
|
SequentialFile |
createSequentialFile(String fileName,
int maxIO) |
void |
deactivateBuffer() |
void |
flush() |
int |
getAlignment() |
CriticalAnalyzer |
getCriticalAnalyzer() |
String |
getDirectory() |
boolean |
isSupportsCallbacks() |
List<String> |
listFiles(String extension)
Lists files that end with the given extension.
|
ByteBuffer |
newBuffer(int size)
Note: You need to release the buffer if is used for reading operations.
|
void |
onIOError(Exception exception,
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) |
CriticalAnalyzer getCriticalAnalyzer()
SequentialFile createSequentialFile(String fileName, int maxIO)
List<String> listFiles(String extension) throws Exception
This method inserts a ".' before the extension.
extension
- Exception
boolean isSupportsCallbacks()
void onIOError(Exception exception, 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 © 2018 JBoss by Red Hat. All rights reserved.