public abstract class AbstractJDBCMessageStore extends Object implements MessageStore
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractJDBCMessageStore.JDBCTransaction |
MessageStore.MessageDeleteListener, MessageStore.MessageStoreReader| Modifier and Type | Field and Description |
|---|---|
protected EventManager |
_eventManager |
| Constructor and Description |
|---|
AbstractJDBCMessageStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDeleteAction(Action<Connection> action) |
void |
addEventListener(EventListener eventListener,
Event... events) |
<T extends StorableMessageMetaData> |
addMessage(T metaData) |
void |
addMessageDeleteListener(MessageStore.MessageDeleteListener listener) |
protected abstract void |
checkMessageStoreOpen() |
void |
closeMessageStore() |
protected void |
createOrOpenMessageStoreDatabase() |
<T extends StorableMessageMetaData> |
createStoredJDBCMessage(long newMessageId,
T metaData,
boolean recovered) |
protected abstract InputStream |
getBlobAsInputStream(ResultSet rs,
int col) |
long |
getBytesEvacuatedFromMemory() |
abstract Connection |
getConnection() |
long |
getInMemorySize() |
protected abstract org.slf4j.Logger |
getLogger() |
long |
getNextMessageId() |
protected abstract String |
getSqlBigIntType() |
protected abstract String |
getSqlBlobStorage(String columnName) |
protected abstract String |
getSqlBlobType() |
protected abstract String |
getSqlVarBinaryType(int size) |
List<String> |
getTableNames() |
protected void |
initMessageStore(ConfiguredObject<?> parent) |
protected abstract boolean |
isMessageStoreOpen() |
boolean |
isPersistent() |
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() |
protected void |
onDelete(Connection conn) |
void |
removeDeleteAction(Action<Connection> action) |
void |
removeMessageDeleteListener(MessageStore.MessageDeleteListener listener) |
protected void |
setMaximumMessageId() |
protected void |
setTablePrefix(String tablePrefix) |
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, onDelete, 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()
closeMessageStore 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 <T extends StorableMessageMetaData> org.apache.qpid.server.store.jdbc.AbstractJDBCMessageStore.StoredJDBCMessage<T> createStoredJDBCMessage(long newMessageId, T metaData, boolean recovered)
public long getNextMessageId()
getNextMessageId in interface MessageStoreprotected Connection newAutoCommitConnection() throws SQLException
SQLExceptionprotected Connection newConnection() throws SQLException
SQLExceptionpublic abstract Connection getConnection() throws SQLException
SQLExceptionpublic Transaction newTransaction()
newTransaction in interface MessageStoreprotected void setTablePrefix(String tablePrefix)
public void addDeleteAction(Action<Connection> action)
public void removeDeleteAction(Action<Connection> action)
protected abstract InputStream getBlobAsInputStream(ResultSet rs, int col) throws SQLException
SQLExceptionpublic boolean isPersistent()
isPersistent in interface MessageStorepublic long getInMemorySize()
getInMemorySize in interface MessageStorepublic long getBytesEvacuatedFromMemory()
getBytesEvacuatedFromMemory in interface MessageStorepublic void addMessageDeleteListener(MessageStore.MessageDeleteListener listener)
addMessageDeleteListener in interface MessageStorepublic void removeMessageDeleteListener(MessageStore.MessageDeleteListener listener)
removeMessageDeleteListener 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)
protected void onDelete(Connection conn)
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.