@ Override public < C extends ConnectionFactoryConfigurationBuilder < ? > > C connectionFactory ( Class < C > klass ) { if ( connectionFactory != null ) { throw new IllegalStateException ( "A ConnectionFactory has already been configured for this store" ) ; } try { Constructor < C > constructor = klass . getDeclaredConstructor ( AbstractJdbcStoreConfigurationBuilder . class ) ; C builder = constructor . newInstance ( this ) ; this . connectionFactory = ( ConnectionFactoryConfigurationBuilder < ConnectionFactoryConfiguration > ) builder ; return builder ; } catch ( Exception e ) { throw new CacheConfigurationException ( "Could not instantiate loader configuration builder '" + klass . getName ( ) + "'" , e ) ; } }
Use the specified ConnectionFactory to handle connection to the database