Class JDBCStoreManager.RefCountConnection

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.sql.Connection, java.sql.Wrapper, Closeable
    Enclosing class:
    JDBCStoreManager

    protected class JDBCStoreManager.RefCountConnection
    extends DelegatingConnection
    Connection wrapper that keeps an internal ref count so that it knows when to really close.
    • Constructor Detail

      • RefCountConnection

        public RefCountConnection​(java.sql.Connection conn)
    • Method Detail

      • getRetain

        public boolean getRetain()
      • setRetain

        public void setRetain​(boolean retain)
      • ref

        public void ref()
      • close

        public void close()
                   throws java.sql.SQLException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface java.sql.Connection
        Overrides:
        close in class DelegatingConnection
        Throws:
        java.sql.SQLException
      • free

        public void free()
      • createStatement

        protected java.sql.Statement createStatement​(int rsType,
                                                     int rsConcur,
                                                     boolean wrap)
                                              throws java.sql.SQLException
        Description copied from class: DelegatingConnection
        Create a statement, with the option of not wrapping it in a DelegatingStatement, which is the default.
        Overrides:
        createStatement in class DelegatingConnection
        Throws:
        java.sql.SQLException
      • prepareStatement

        protected java.sql.PreparedStatement prepareStatement​(java.lang.String sql,
                                                              int rsType,
                                                              int rsConcur,
                                                              boolean wrap)
                                                       throws java.sql.SQLException
        Description copied from class: DelegatingConnection
        Prepare a statement, with the option of not wrapping it in a DelegatingPreparedStatement, which is the default.
        Overrides:
        prepareStatement in class DelegatingConnection
        Throws:
        java.sql.SQLException