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 userName,
String password,
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() |
long |
getBufferSize() |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCriticalAnalyzer
public JDBCSequentialFileFactory(DataSource dataSource, SQLProvider sqlProvider, Executor executor, IOCriticalErrorListener criticalErrorListener) throws Exception
Exception
public JDBCSequentialFileFactory(String connectionUrl, String userName, String password, String className, SQLProvider sqlProvider, Executor executor, IOCriticalErrorListener criticalErrorListener) throws Exception
Exception
public JDBCSequentialFileFactory(Connection connection, SQLProvider sqlProvider, Executor executor, IOCriticalErrorListener criticalErrorListener) throws Exception
Exception
public JDBCSequentialFileFactoryDriver getDbDriver()
public JDBCSequentialFileFactory setNetworkTimeout(Executor executor, int milliseconds)
public SequentialFileFactory setDatasync(boolean enabled)
setDatasync
in interface SequentialFileFactory
public boolean isDatasync()
isDatasync
in interface SequentialFileFactory
public long getBufferSize()
getBufferSize
in interface SequentialFileFactory
public void start()
start
in interface SequentialFileFactory
start
in interface ActiveMQComponent
public void stop()
stop
in interface SequentialFileFactory
stop
in interface ActiveMQComponent
public SequentialFile createSequentialFile(String fileName)
createSequentialFile
in interface SequentialFileFactory
public void sequentialFileClosed(SequentialFile file)
public int getNumberOfOpenFiles()
public int getMaxIO()
getMaxIO
in interface SequentialFileFactory
public List<String> listFiles(String extension) throws Exception
SequentialFileFactory
This method inserts a ".' before the extension.
listFiles
in interface SequentialFileFactory
Exception
public boolean isSupportsCallbacks()
isSupportsCallbacks
in interface SequentialFileFactory
public void onIOError(Exception exception, String message, SequentialFile file)
SequentialFileFactory
onIOError
in interface SequentialFileFactory
public ByteBuffer allocateDirectBuffer(int size)
SequentialFileFactory
allocateDirectBuffer
in interface SequentialFileFactory
public void releaseDirectBuffer(ByteBuffer buffer)
SequentialFileFactory
releaseDirectBuffer
in interface SequentialFileFactory
public ByteBuffer newBuffer(int size)
SequentialFileFactory
newBuffer
in interface SequentialFileFactory
public void clearBuffer(ByteBuffer buffer)
clearBuffer
in interface SequentialFileFactory
public ByteBuffer wrapBuffer(byte[] bytes)
wrapBuffer
in interface SequentialFileFactory
public int getAlignment()
getAlignment
in interface SequentialFileFactory
public JDBCSequentialFileFactory setAlignment(int alignment)
setAlignment
in interface SequentialFileFactory
public int calculateBlockSize(int bytes)
calculateBlockSize
in interface SequentialFileFactory
public void deactivateBuffer()
deactivateBuffer
in interface SequentialFileFactory
public void releaseBuffer(ByteBuffer buffer)
releaseBuffer
in interface SequentialFileFactory
public void activateBuffer(SequentialFile file)
activateBuffer
in interface SequentialFileFactory
public File getDirectory()
getDirectory
in interface SequentialFileFactory
public boolean isStarted()
isStarted
in interface ActiveMQComponent
public void createDirs() throws Exception
SequentialFileFactory
createDirs
in interface SequentialFileFactory
Exception
public void flush()
flush
in interface SequentialFileFactory
public void destroy() throws SQLException
SQLException
Copyright © 2019 JBoss by Red Hat. All rights reserved.