public < T extends StoreConfigurationBuilder < ? , ? > > T addStore ( Class < T > klass ) { try { Constructor < T > constructor = klass . getDeclaredConstructor ( PersistenceConfigurationBuilder . class ) ; T builder = constructor . newInstance ( this ) ; this . stores . add ( builder ) ; return builder ; } catch ( Exception e ) { throw new CacheConfigurationException ( "Could not instantiate loader configuration builder '" + klass . getName ( ) + "'" , e ) ; } }
Adds a cache loader that uses the specified builder class to build its configuration .