public abstract class AbstractJDBCConfigurationStore extends Object implements MessageStoreProvider, DurableConfigurationStore
| Modifier and Type | Field and Description |
|---|---|
static Set<String> |
CONFIGURATION_STORE_TABLE_NAMES |
| Constructor and Description |
|---|
AbstractJDBCConfigurationStore() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
checkConfigurationStoreOpen() |
void |
create(ConfiguredObjectRecord object)
Makes the specified object persistent.
|
protected void |
createOrOpenConfigurationStoreDatabase(boolean clear) |
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 |
getSqlBlobType() |
protected abstract String |
getSqlVarBinaryType(int size) |
protected boolean |
hasNoConfigurationEntries() |
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.
|
void |
onDelete(ConfiguredObject<?> parent)
Deletes the configuration store from its underlying storage.
|
UUID[] |
remove(ConfiguredObjectRecord... objects)
Removes the specified persistent configured objects.
|
protected boolean |
tableExists(String tableName,
Connection conn) |
void |
update(boolean createIfNecessary,
ConfiguredObjectRecord... records)
Updates the specified objects in the persistent store, IF it is already present.
|
protected void |
upgradeIfNecessary(ConfiguredObject<?> parent) |
void |
visitConfiguredObjectRecords(ConfiguredObjectRecordHandler handler)
Visit all configured object records with given handler.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMessageStorecloseConfigurationStore, openConfigurationStore, upgradeStoreStructurepublic void visitConfiguredObjectRecords(ConfiguredObjectRecordHandler handler)
DurableConfigurationStorevisitConfiguredObjectRecords in interface DurableConfigurationStorehandler - a handler to invoke on each configured object recordprotected abstract void checkConfigurationStoreOpen()
protected 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(boolean clear)
throws StoreException
StoreExceptionprotected boolean tableExists(String tableName, Connection conn) throws SQLException
SQLExceptionpublic void create(ConfiguredObjectRecord object) throws StoreException
DurableConfigurationStorecreate in interface DurableConfigurationStoreobject - The object to persist.StoreException - If the operation fails for any reason.protected Connection newAutoCommitConnection() throws SQLException
SQLExceptionprotected Connection newConnection() throws SQLException
SQLExceptionprotected boolean hasNoConfigurationEntries()
protected abstract Connection getConnection() throws SQLException
SQLExceptionpublic UUID[] remove(ConfiguredObjectRecord... objects) throws StoreException
DurableConfigurationStoreremove in interface DurableConfigurationStoreobjects - The objects to remove.StoreException - If the operation fails for any reason.public void update(boolean createIfNecessary,
ConfiguredObjectRecord... records)
throws StoreException
DurableConfigurationStoreupdate in interface DurableConfigurationStorecreateIfNecessary - if false then will fail if the object does not exist.records - the records to updateStoreException - If the operation fails for any reason.protected abstract String getBlobAsString(ResultSet rs, int col) throws SQLException
SQLExceptionpublic void onDelete(ConfiguredObject<?> parent)
DurableConfigurationStoreonDelete in interface DurableConfigurationStoreCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.