public class JDBCSequentialFileFactory extends Object implements SequentialFileFactory, ActiveMQComponent
| Constructor and Description |
|---|
JDBCSequentialFileFactory(String connectionUrl,
String tableName,
String className,
Executor executor) |
| 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 |
destroy() |
void |
flush() |
int |
getAlignment() |
File |
getDirectory() |
int |
getMaxIO() |
boolean |
isStarted() |
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) |
public void start()
start in interface SequentialFileFactorystart in interface ActiveMQComponentpublic void stop()
stop in interface SequentialFileFactorystop in interface ActiveMQComponentpublic SequentialFile createSequentialFile(String fileName)
createSequentialFile in interface SequentialFileFactorypublic int getMaxIO()
getMaxIO in interface SequentialFileFactorypublic List<String> listFiles(String extension) throws Exception
SequentialFileFactoryThis method inserts a ".' before the extension.
listFiles in interface SequentialFileFactoryExceptionpublic boolean isSupportsCallbacks()
isSupportsCallbacks in interface SequentialFileFactorypublic void onIOError(Exception exception, String message, SequentialFile file)
SequentialFileFactoryonIOError in interface SequentialFileFactorypublic ByteBuffer allocateDirectBuffer(int size)
SequentialFileFactoryallocateDirectBuffer in interface SequentialFileFactorypublic void releaseDirectBuffer(ByteBuffer buffer)
SequentialFileFactoryreleaseDirectBuffer in interface SequentialFileFactorypublic ByteBuffer newBuffer(int size)
SequentialFileFactorynewBuffer in interface SequentialFileFactorypublic void clearBuffer(ByteBuffer buffer)
clearBuffer in interface SequentialFileFactorypublic ByteBuffer wrapBuffer(byte[] bytes)
wrapBuffer in interface SequentialFileFactorypublic int getAlignment()
getAlignment in interface SequentialFileFactorypublic int calculateBlockSize(int bytes)
calculateBlockSize in interface SequentialFileFactorypublic void deactivateBuffer()
deactivateBuffer in interface SequentialFileFactorypublic void releaseBuffer(ByteBuffer buffer)
releaseBuffer in interface SequentialFileFactorypublic void activateBuffer(SequentialFile file)
activateBuffer in interface SequentialFileFactorypublic File getDirectory()
getDirectory in interface SequentialFileFactorypublic boolean isStarted()
isStarted in interface ActiveMQComponentpublic void createDirs()
throws Exception
SequentialFileFactorycreateDirs in interface SequentialFileFactoryExceptionpublic void flush()
flush in interface SequentialFileFactorypublic void destroy()
throws SQLException
SQLExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.