public class JDBCSequentialFileFactory extends Object implements SequentialFileFactory, ActiveMQComponent
| Constructor and Description |
|---|
JDBCSequentialFileFactory(Connection connection,
SQLProvider sqlProvider,
Executor executor,
IOCriticalErrorListener criticalErrorListener) |
JDBCSequentialFileFactory(DataSource dataSource,
SQLProvider sqlProvider,
Executor executor,
IOCriticalErrorListener criticalErrorListener) |
JDBCSequentialFileFactory(String connectionUrl,
String className,
SQLProvider sqlProvider,
Executor executor,
IOCriticalErrorListener criticalErrorListener) |
| 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() |
JDBCSequentialFileFactoryDriver |
getDbDriver() |
File |
getDirectory() |
int |
getMaxIO() |
int |
getNumberOfOpenFiles() |
boolean |
isDatasync() |
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 |
sequentialFileClosed(SequentialFile file) |
JDBCSequentialFileFactory |
setAlignment(int alignment) |
SequentialFileFactory |
setDatasync(boolean enabled) |
JDBCSequentialFileFactory |
setNetworkTimeout(Executor executor,
int milliseconds) |
void |
start() |
void |
stop() |
ByteBuffer |
wrapBuffer(byte[] bytes) |
public JDBCSequentialFileFactory(DataSource dataSource, SQLProvider sqlProvider, Executor executor, IOCriticalErrorListener criticalErrorListener) throws Exception
Exceptionpublic JDBCSequentialFileFactory(String connectionUrl, String className, SQLProvider sqlProvider, Executor executor, IOCriticalErrorListener criticalErrorListener) throws Exception
Exceptionpublic JDBCSequentialFileFactory(Connection connection, SQLProvider sqlProvider, Executor executor, IOCriticalErrorListener criticalErrorListener) throws Exception
Exceptionpublic JDBCSequentialFileFactoryDriver getDbDriver()
public JDBCSequentialFileFactory setNetworkTimeout(Executor executor, int milliseconds)
public SequentialFileFactory setDatasync(boolean enabled)
setDatasync in interface SequentialFileFactorypublic boolean isDatasync()
isDatasync in interface SequentialFileFactorypublic 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 void sequentialFileClosed(SequentialFile file)
public int getNumberOfOpenFiles()
public 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 JDBCSequentialFileFactory setAlignment(int alignment)
setAlignment 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 © 2018 JBoss by Red Hat. All rights reserved.