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, wait
getStoreLocation, getStoreLocationAsFile, openMessageStore, upgradeStoreStructure
protected final EventManager _eventManager
protected abstract boolean isMessageStoreOpen()
protected abstract void checkMessageStoreOpen()
protected void setMaximumMessageId()
protected void upgrade(ConfiguredObject<?> parent) throws StoreException
StoreException
protected void initMessageStore(ConfiguredObject<?> parent)
public void closeMessageStore()
MessageStore
closeMessageStore
in interface MessageStore
protected abstract org.slf4j.Logger getLogger()
protected abstract String getSqlBlobType()
protected abstract String getSqlVarBinaryType(int size)
protected abstract String getSqlBigIntType()
protected void createOrOpenMessageStoreDatabase() throws StoreException
StoreException
protected boolean tableExists(String tableName, Connection conn) throws SQLException
SQLException
public <T extends StorableMessageMetaData> MessageHandle<T> addMessage(T metaData)
addMessage
in interface MessageStore
public long getNextMessageId()
getNextMessageId
in interface MessageStore
protected Connection newAutoCommitConnection() throws SQLException
SQLException
protected Connection newConnection() throws SQLException
SQLException
protected abstract Connection getConnection() throws SQLException
SQLException
public Transaction newTransaction()
newTransaction
in interface MessageStore
protected abstract byte[] getBlobAsBytes(ResultSet rs, int col) throws SQLException
SQLException
public boolean isPersistent()
MessageStore
isPersistent
in interface MessageStore
public void addEventListener(EventListener eventListener, Event... events)
addEventListener
in interface MessageStore
public MessageStore.MessageStoreReader newMessageStoreReader()
newMessageStoreReader
in interface MessageStore
protected abstract void storedSizeChange(int storeSizeIncrease)
public void onDelete(ConfiguredObject<?> parent)
onDelete
in interface MessageStore
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.