public abstract class AbstractJDBCConfigurationStore extends Object implements MessageStoreProvider, DurableConfigurationStore
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractJDBCConfigurationStore.State |
| Constructor and Description |
|---|
AbstractJDBCConfigurationStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDeleteAction(Action<Connection> action) |
protected void |
assertState(AbstractJDBCConfigurationStore.State state) |
protected void |
changeState(AbstractJDBCConfigurationStore.State oldState,
AbstractJDBCConfigurationStore.State newState) |
void |
create(ConfiguredObjectRecord object) |
protected void |
createOrOpenConfigurationStoreDatabase() |
protected void |
doIfNotState(AbstractJDBCConfigurationStore.State state,
Runnable action) |
protected abstract String |
getBlobAsString(ResultSet rs,
int col) |
protected abstract Connection |
getConnection() |
protected abstract org.slf4j.Logger |
getLogger() |
protected abstract String |
getSqlBigIntType() |
protected abstract String |
getSqlBlobStorage(String columnName) |
protected abstract String |
getSqlBlobType() |
protected abstract String |
getSqlVarBinaryType(int size) |
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.
|
boolean |
openConfigurationStore(ConfiguredObjectRecordHandler handler,
ConfiguredObjectRecord... initialRecords) |
void |
reload(ConfiguredObjectRecordHandler handler) |
UUID[] |
remove(ConfiguredObjectRecord... objects) |
void |
removeDeleteAction(Action<Connection> action) |
protected void |
setState(AbstractJDBCConfigurationStore.State newState) |
protected void |
setTableNamePrefix(String tableNamePrefix) |
protected boolean |
tableExists(String tableName,
Connection conn) |
void |
update(boolean createIfNecessary,
ConfiguredObjectRecord... records) |
protected void |
upgradeIfNecessary(ConfiguredObject<?> parent) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMessageStorecloseConfigurationStore, init, onDelete, upgradeStoreStructureprotected void setTableNamePrefix(String tableNamePrefix)
public boolean openConfigurationStore(ConfiguredObjectRecordHandler handler, ConfiguredObjectRecord... initialRecords)
openConfigurationStore in interface DurableConfigurationStorepublic void reload(ConfiguredObjectRecordHandler handler) throws StoreException
reload in interface DurableConfigurationStoreStoreExceptionprotected void upgradeIfNecessary(ConfiguredObject<?> parent) throws StoreException
StoreExceptionprotected abstract org.slf4j.Logger getLogger()
protected abstract String getSqlBlobType()
protected abstract String getSqlVarBinaryType(int size)
protected abstract String getSqlBigIntType()
protected void createOrOpenConfigurationStoreDatabase()
throws StoreException
StoreExceptionprotected boolean tableExists(String tableName, Connection conn) throws SQLException
SQLExceptionpublic void create(ConfiguredObjectRecord object) throws StoreException
create in interface DurableConfigurationStoreStoreExceptionprotected Connection newAutoCommitConnection() throws SQLException
SQLExceptionprotected Connection newConnection() throws SQLException
SQLExceptionprotected abstract Connection getConnection() throws SQLException
SQLExceptionpublic UUID[] remove(ConfiguredObjectRecord... objects) throws StoreException
remove in interface DurableConfigurationStoreStoreExceptionpublic void update(boolean createIfNecessary,
ConfiguredObjectRecord... records)
throws StoreException
update in interface DurableConfigurationStoreStoreExceptionpublic void addDeleteAction(Action<Connection> action)
public void removeDeleteAction(Action<Connection> action)
protected abstract String getBlobAsString(ResultSet rs, int col) throws SQLException
SQLExceptionprotected final void assertState(AbstractJDBCConfigurationStore.State state)
protected final void changeState(AbstractJDBCConfigurationStore.State oldState, AbstractJDBCConfigurationStore.State newState)
protected final void setState(AbstractJDBCConfigurationStore.State newState)
protected final void doIfNotState(AbstractJDBCConfigurationStore.State state, Runnable action)
Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.