public class JDBCJournalImpl extends AbstractJDBCDriver implements Journal
Journal.JournalStateconnection, sqlProvider| Constructor and Description |
|---|
JDBCJournalImpl(DataSource dataSource,
SQLProvider provider,
ScheduledExecutorService scheduledExecutorService,
Executor completeExecutor,
IOCriticalErrorListener criticalIOErrorListener,
long syncDelay) |
JDBCJournalImpl(String jdbcUrl,
String user,
String password,
String jdbcDriverClass,
SQLProvider sqlProvider,
ScheduledExecutorService scheduledExecutorService,
Executor completeExecutor,
IOCriticalErrorListener criticalIOErrorListener,
long syncDelay) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendAddRecord(long id,
byte recordType,
byte[] record,
boolean sync) |
void |
appendAddRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync) |
void |
appendAddRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync,
IOCompletion completionCallback) |
void |
appendAddRecordTransactional(long txID,
long id,
byte recordType,
byte[] record) |
void |
appendAddRecordTransactional(long txID,
long id,
byte recordType,
Persister persister,
Object record) |
void |
appendCommitRecord(long txID,
boolean sync) |
void |
appendCommitRecord(long txID,
boolean sync,
IOCompletion callback) |
void |
appendCommitRecord(long txID,
boolean sync,
IOCompletion callback,
boolean lineUpContext) |
void |
appendDeleteRecord(long id,
boolean sync) |
void |
appendDeleteRecord(long id,
boolean sync,
IOCompletion completionCallback) |
void |
appendDeleteRecordTransactional(long txID,
long id) |
void |
appendDeleteRecordTransactional(long txID,
long id,
byte[] record) |
void |
appendDeleteRecordTransactional(long txID,
long id,
EncodingSupport record) |
void |
appendPrepareRecord(long txID,
byte[] transactionData,
boolean sync) |
void |
appendPrepareRecord(long txID,
EncodingSupport transactionData,
boolean sync) |
void |
appendPrepareRecord(long txID,
EncodingSupport transactionData,
boolean sync,
IOCompletion callback) |
void |
appendRollbackRecord(long txID,
boolean sync) |
void |
appendRollbackRecord(long txID,
boolean sync,
IOCompletion callback) |
void |
appendUpdateRecord(long id,
byte recordType,
byte[] record,
boolean sync) |
void |
appendUpdateRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync) |
void |
appendUpdateRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync,
IOCompletion completionCallback) |
void |
appendUpdateRecordTransactional(long txID,
long id,
byte recordType,
byte[] record) |
void |
appendUpdateRecordTransactional(long txID,
long id,
byte recordType,
Persister persister,
Object record) |
Map<Long,JournalFile> |
createFilesForBackupSync(long[] fileIds) |
protected void |
createSchema() |
void |
destroy() |
void |
flush() |
void |
forceMoveNextFile() |
int |
getAlignment() |
JournalFile[] |
getDataFiles() |
SequentialFileFactory |
getFileFactory() |
int |
getFileSize() |
long |
getMaxRecordSize()
The max size record that can be stored in the journal
|
int |
getNumberOfRecords() |
int |
getUserVersion() |
void |
handleException(List<org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalRecord> recordRef,
Throwable e)
public for tests only, not through API
|
boolean |
isStarted() |
void |
lineUpContext(IOCompletion callback) |
JournalLoadInformation |
load(List<RecordInfo> committedRecords,
List<PreparedTransactionInfo> preparedTransactions,
TransactionFailureCallback failureCallback,
boolean fixBadTX) |
JournalLoadInformation |
load(LoaderCallback reloadManager) |
JournalLoadInformation |
loadInternalOnly() |
JournalLoadInformation |
loadSyncOnly(Journal.JournalState state) |
protected void |
prepareStatements() |
void |
replicationSyncFinished() |
void |
replicationSyncPreserveOldFiles() |
void |
runDirectJournalBlast() |
void |
scheduleCompactAndBlock(int timeout) |
void |
start() |
void |
stop() |
void |
stop(boolean sync) |
int |
sync() |
void |
synchronizationLock() |
void |
synchronizationUnlock() |
createTable, getConnection, getPassword, getUser, setConnection, setDataSource, setJdbcConnectionUrl, setJdbcDriverClass, setNetworkTimeout, setPassword, setSqlProvider, setUserclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendAddRecord, appendAddRecord, appendAddRecordTransactional, appendUpdateRecord, appendUpdateRecord, appendUpdateRecordTransactional, loadasyncStoppublic JDBCJournalImpl(DataSource dataSource, SQLProvider provider, ScheduledExecutorService scheduledExecutorService, Executor completeExecutor, IOCriticalErrorListener criticalIOErrorListener, long syncDelay)
public JDBCJournalImpl(String jdbcUrl, String user, String password, String jdbcDriverClass, SQLProvider sqlProvider, ScheduledExecutorService scheduledExecutorService, Executor completeExecutor, IOCriticalErrorListener criticalIOErrorListener, long syncDelay)
public void start()
throws SQLException
start in interface ActiveMQComponentstart in class AbstractJDBCDriverSQLExceptionpublic void flush()
throws Exception
public long getMaxRecordSize()
getMaxRecordSize in interface Journalprotected void createSchema()
throws SQLException
createSchema in class AbstractJDBCDriverSQLExceptionprotected void prepareStatements()
throws SQLException
prepareStatements in class AbstractJDBCDriverSQLExceptionpublic void stop()
throws SQLException
stop in interface ActiveMQComponentstop in class AbstractJDBCDriverSQLExceptionpublic void stop(boolean sync)
throws SQLException
SQLExceptionpublic void destroy()
throws Exception
destroy in class AbstractJDBCDriverExceptionpublic int sync()
public void handleException(List<org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalRecord> recordRef, Throwable e)
public void appendAddRecord(long id,
byte recordType,
byte[] record,
boolean sync)
throws Exception
appendAddRecord in interface JournalExceptionpublic void appendAddRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync)
throws Exception
appendAddRecord in interface JournalExceptionpublic void appendAddRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync,
IOCompletion completionCallback)
throws Exception
appendAddRecord in interface JournalExceptionpublic void appendUpdateRecord(long id,
byte recordType,
byte[] record,
boolean sync)
throws Exception
appendUpdateRecord in interface JournalExceptionpublic void appendUpdateRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync)
throws Exception
appendUpdateRecord in interface JournalExceptionpublic void appendUpdateRecord(long id,
byte recordType,
Persister persister,
Object record,
boolean sync,
IOCompletion completionCallback)
throws Exception
appendUpdateRecord in interface JournalExceptionpublic void appendDeleteRecord(long id,
boolean sync)
throws Exception
appendDeleteRecord in interface JournalExceptionpublic void appendDeleteRecord(long id,
boolean sync,
IOCompletion completionCallback)
throws Exception
appendDeleteRecord in interface JournalExceptionpublic void appendAddRecordTransactional(long txID,
long id,
byte recordType,
byte[] record)
throws Exception
appendAddRecordTransactional in interface JournalExceptionpublic void appendAddRecordTransactional(long txID,
long id,
byte recordType,
Persister persister,
Object record)
throws Exception
appendAddRecordTransactional in interface JournalExceptionpublic void appendUpdateRecordTransactional(long txID,
long id,
byte recordType,
byte[] record)
throws Exception
appendUpdateRecordTransactional in interface JournalExceptionpublic void appendUpdateRecordTransactional(long txID,
long id,
byte recordType,
Persister persister,
Object record)
throws Exception
appendUpdateRecordTransactional in interface JournalExceptionpublic void appendDeleteRecordTransactional(long txID,
long id,
byte[] record)
throws Exception
appendDeleteRecordTransactional in interface JournalExceptionpublic void appendDeleteRecordTransactional(long txID,
long id,
EncodingSupport record)
throws Exception
appendDeleteRecordTransactional in interface JournalExceptionpublic void appendDeleteRecordTransactional(long txID,
long id)
throws Exception
appendDeleteRecordTransactional in interface JournalExceptionpublic void appendCommitRecord(long txID,
boolean sync)
throws Exception
appendCommitRecord in interface JournalExceptionpublic void appendCommitRecord(long txID,
boolean sync,
IOCompletion callback)
throws Exception
appendCommitRecord in interface JournalExceptionpublic void appendCommitRecord(long txID,
boolean sync,
IOCompletion callback,
boolean lineUpContext)
throws Exception
appendCommitRecord in interface JournalExceptionpublic void appendPrepareRecord(long txID,
EncodingSupport transactionData,
boolean sync)
throws Exception
appendPrepareRecord in interface JournalExceptionpublic void appendPrepareRecord(long txID,
EncodingSupport transactionData,
boolean sync,
IOCompletion callback)
throws Exception
appendPrepareRecord in interface JournalExceptionpublic void appendPrepareRecord(long txID,
byte[] transactionData,
boolean sync)
throws Exception
appendPrepareRecord in interface JournalExceptionpublic void appendRollbackRecord(long txID,
boolean sync)
throws Exception
appendRollbackRecord in interface JournalExceptionpublic void appendRollbackRecord(long txID,
boolean sync,
IOCompletion callback)
throws Exception
appendRollbackRecord in interface JournalExceptionpublic JournalLoadInformation load(LoaderCallback reloadManager)
public JournalLoadInformation loadInternalOnly() throws Exception
loadInternalOnly in interface JournalExceptionpublic JournalLoadInformation loadSyncOnly(Journal.JournalState state) throws Exception
loadSyncOnly in interface JournalExceptionpublic void lineUpContext(IOCompletion callback)
lineUpContext in interface Journalpublic JournalLoadInformation load(List<RecordInfo> committedRecords, List<PreparedTransactionInfo> preparedTransactions, TransactionFailureCallback failureCallback, boolean fixBadTX) throws Exception
public int getAlignment()
throws Exception
getAlignment in interface JournalExceptionpublic int getNumberOfRecords()
getNumberOfRecords in interface Journalpublic int getUserVersion()
getUserVersion in interface Journalpublic void runDirectJournalBlast()
throws Exception
runDirectJournalBlast in interface JournalExceptionpublic Map<Long,JournalFile> createFilesForBackupSync(long[] fileIds) throws Exception
createFilesForBackupSync in interface JournalExceptionpublic final void synchronizationLock()
synchronizationLock in interface Journalpublic final void synchronizationUnlock()
synchronizationUnlock in interface Journalpublic void forceMoveNextFile()
throws Exception
forceMoveNextFile in interface JournalExceptionpublic JournalFile[] getDataFiles()
getDataFiles in interface Journalpublic SequentialFileFactory getFileFactory()
getFileFactory in interface Journalpublic int getFileSize()
getFileSize in interface Journalpublic void scheduleCompactAndBlock(int timeout)
throws Exception
scheduleCompactAndBlock in interface JournalExceptionpublic void replicationSyncPreserveOldFiles()
replicationSyncPreserveOldFiles in interface Journalpublic void replicationSyncFinished()
replicationSyncFinished in interface Journalpublic boolean isStarted()
isStarted in interface ActiveMQComponentCopyright © 2019 The Apache Software Foundation. All Rights Reserved.