Class AbstractJDBCConfigurationStore

  • All Implemented Interfaces:
    org.apache.qpid.server.store.DurableConfigurationStore, org.apache.qpid.server.store.MessageStoreProvider
    Direct Known Subclasses:
    GenericJDBCConfigurationStore

    public abstract class AbstractJDBCConfigurationStore
    extends java.lang.Object
    implements org.apache.qpid.server.store.MessageStoreProvider, org.apache.qpid.server.store.DurableConfigurationStore
    • Constructor Detail

      • AbstractJDBCConfigurationStore

        public AbstractJDBCConfigurationStore()
    • Method Detail

      • setTableNamePrefix

        protected void setTableNamePrefix​(java.lang.String tableNamePrefix)
      • openConfigurationStore

        public boolean openConfigurationStore​(org.apache.qpid.server.store.handler.ConfiguredObjectRecordHandler handler,
                                              org.apache.qpid.server.store.ConfiguredObjectRecord... initialRecords)
        Specified by:
        openConfigurationStore in interface org.apache.qpid.server.store.DurableConfigurationStore
      • reload

        public void reload​(org.apache.qpid.server.store.handler.ConfiguredObjectRecordHandler handler)
                    throws org.apache.qpid.server.store.StoreException
        Specified by:
        reload in interface org.apache.qpid.server.store.DurableConfigurationStore
        Throws:
        org.apache.qpid.server.store.StoreException
      • upgradeIfNecessary

        protected void upgradeIfNecessary​(org.apache.qpid.server.model.ConfiguredObject<?> parent)
                                   throws org.apache.qpid.server.store.StoreException
        Throws:
        org.apache.qpid.server.store.StoreException
      • getLogger

        protected abstract org.slf4j.Logger getLogger()
      • getSqlBlobType

        protected abstract java.lang.String getSqlBlobType()
      • getSqlBlobStorage

        protected abstract java.lang.String getSqlBlobStorage​(java.lang.String columnName)
      • getSqlVarBinaryType

        protected abstract java.lang.String getSqlVarBinaryType​(int size)
      • getSqlBigIntType

        protected abstract java.lang.String getSqlBigIntType()
      • createOrOpenConfigurationStoreDatabase

        protected void createOrOpenConfigurationStoreDatabase()
                                                       throws org.apache.qpid.server.store.StoreException
        Throws:
        org.apache.qpid.server.store.StoreException
      • tableExists

        protected boolean tableExists​(java.lang.String tableName,
                                      java.sql.Connection conn)
                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • create

        public void create​(org.apache.qpid.server.store.ConfiguredObjectRecord object)
                    throws org.apache.qpid.server.store.StoreException
        Specified by:
        create in interface org.apache.qpid.server.store.DurableConfigurationStore
        Throws:
        org.apache.qpid.server.store.StoreException
      • newAutoCommitConnection

        protected java.sql.Connection newAutoCommitConnection()
                                                       throws java.sql.SQLException
        Convenience method to create a new Connection configured for TRANSACTION_READ_COMMITED isolation and with auto-commit transactions enabled.
        Throws:
        java.sql.SQLException
      • newConnection

        protected java.sql.Connection newConnection()
                                             throws java.sql.SQLException
        Convenience method to create a new Connection configured for TRANSACTION_READ_COMMITED isolation and with auto-commit transactions disabled.
        Throws:
        java.sql.SQLException
      • getConnection

        protected abstract java.sql.Connection getConnection()
                                                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • remove

        public java.util.UUID[] remove​(org.apache.qpid.server.store.ConfiguredObjectRecord... objects)
                                throws org.apache.qpid.server.store.StoreException
        Specified by:
        remove in interface org.apache.qpid.server.store.DurableConfigurationStore
        Throws:
        org.apache.qpid.server.store.StoreException
      • update

        public void update​(boolean createIfNecessary,
                           org.apache.qpid.server.store.ConfiguredObjectRecord... records)
                    throws org.apache.qpid.server.store.StoreException
        Specified by:
        update in interface org.apache.qpid.server.store.DurableConfigurationStore
        Throws:
        org.apache.qpid.server.store.StoreException
      • addDeleteAction

        public void addDeleteAction​(org.apache.qpid.server.util.Action<java.sql.Connection> action)
      • removeDeleteAction

        public void removeDeleteAction​(org.apache.qpid.server.util.Action<java.sql.Connection> action)
      • getBlobAsString

        protected abstract java.lang.String getBlobAsString​(java.sql.ResultSet rs,
                                                            int col)
                                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException