public abstract class AbstractJDBCMessageStore extends Object implements MessageStore
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractJDBCMessageStore.JDBCTransaction |
MessageStore.MessageStoreReader| Modifier and Type | Field and Description |
|---|---|
protected EventManager |
_eventManager |
static Set<String> |
MESSAGE_STORE_TABLE_NAMES |
| Constructor and Description |
|---|
AbstractJDBCMessageStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(EventListener eventListener,
Event... events) |
<T extends StorableMessageMetaData> |
addMessage(T metaData) |
protected abstract void |
checkMessageStoreOpen() |
void |
closeMessageStore()
Called to close and cleanup any resources used by the message store.
|
protected void |
createOrOpenMessageStoreDatabase() |
protected abstract byte[] |
getBlobAsBytes(ResultSet rs,
int col) |
protected abstract Connection |
getConnection() |
protected abstract org.slf4j.Logger |
getLogger() |
long |
getNextMessageId() |
protected abstract String |
getSqlBigIntType() |
protected abstract String |
getSqlBlobType() |
protected abstract String |
getSqlVarBinaryType(int size) |
protected void |
initMessageStore(ConfiguredObject<?> parent) |
protected abstract boolean |
isMessageStoreOpen() |
boolean |
isPersistent()
Is this store capable of persisting the data
|
protected Connection |
newAutoCommitConnection()
Convenience method to create a new Connection configured for TRANSACTION_READ_COMMITED
isolation and with auto-commit transactions enabled.
|
protected Connection |
newConnection()
Convenience method to create a new Connection configured for TRANSACTION_READ_COMMITED
isolation and with auto-commit transactions disabled.
|
MessageStore.MessageStoreReader |
newMessageStoreReader() |
Transaction |
newTransaction() |
void |
onDelete(ConfiguredObject<?> parent) |
protected void |
setMaximumMessageId() |
protected abstract void |
storedSizeChange(int storeSizeIncrease) |
protected boolean |
tableExists(String tableName,
Connection conn) |
protected void |
upgrade(ConfiguredObject<?> parent) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetStoreLocation, getStoreLocationAsFile, openMessageStore, upgradeStoreStructureprotected final EventManager _eventManager
protected abstract boolean isMessageStoreOpen()
protected abstract void checkMessageStoreOpen()
protected void setMaximumMessageId()
protected void upgrade(ConfiguredObject<?> parent) throws StoreException
StoreExceptionprotected void initMessageStore(ConfiguredObject<?> parent)
public void closeMessageStore()
MessageStorecloseMessageStore in interface MessageStoreprotected abstract org.slf4j.Logger getLogger()
protected abstract String getSqlBlobType()
protected abstract String getSqlVarBinaryType(int size)
protected abstract String getSqlBigIntType()
protected void createOrOpenMessageStoreDatabase()
throws StoreException
StoreExceptionprotected boolean tableExists(String tableName, Connection conn) throws SQLException
SQLExceptionpublic <T extends StorableMessageMetaData> MessageHandle<T> addMessage(T metaData)
addMessage in interface MessageStorepublic long getNextMessageId()
getNextMessageId in interface MessageStoreprotected Connection newAutoCommitConnection() throws SQLException
SQLExceptionprotected Connection newConnection() throws SQLException
SQLExceptionprotected abstract Connection getConnection() throws SQLException
SQLExceptionpublic Transaction newTransaction()
newTransaction in interface MessageStoreprotected abstract byte[] getBlobAsBytes(ResultSet rs, int col) throws SQLException
SQLExceptionpublic boolean isPersistent()
MessageStoreisPersistent in interface MessageStorepublic void addEventListener(EventListener eventListener, Event... events)
addEventListener in interface MessageStorepublic MessageStore.MessageStoreReader newMessageStoreReader()
newMessageStoreReader in interface MessageStoreprotected abstract void storedSizeChange(int storeSizeIncrease)
public void onDelete(ConfiguredObject<?> parent)
onDelete in interface MessageStoreCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.