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) |
void |
deactivateBuffer() |
void |
flush() |
int |
getAlignment() |
long |
getBufferSize() |
default CriticalAnalyzer |
getCriticalAnalyzer() |
File |
getDirectory() |
int |
getMaxIO() |
boolean |
isDatasync() |
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.
|
SequentialFileFactory |
setAlignment(int alignment) |
SequentialFileFactory |
setDatasync(boolean enabled) |
void |
start() |
void |
stop() |
ByteBuffer |
wrapBuffer(byte[] bytes) |
default CriticalAnalyzer getCriticalAnalyzer()
SequentialFile createSequentialFile(String fileName)
int getMaxIO()
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()
SequentialFileFactory setAlignment(int alignment)
int calculateBlockSize(int bytes)
File getDirectory()
void clearBuffer(ByteBuffer buffer)
void start()
void stop()
void createDirs() throws Exception
Exception
void flush()
SequentialFileFactory setDatasync(boolean enabled)
boolean isDatasync()
long getBufferSize()
Copyright © 2019 JBoss by Red Hat. All rights reserved.