*/
public static final <S, T> BackingStore<S, T> createBackingStore(
String storeType, String storeName, Class<S> keyClazz, Class<T> entryClazz)
throws BackingStoreException {
BackingStore<S, T> store = null;
BackingStoreFactory factory = null;
try {
factory = BackingStoreFactoryRegistry.getFactoryInstance(storeType);
} catch (BackingStoreException bse) {
throw bse;
} catch (Exception ex) {
throw new BackingStoreException(ex.getMessage(), ex);
}
if (factory != null) {
try {
Class metaData = StoreEntryMetadataCache.getMetadata(storeName, entryClazz);
store = factory.createBackingStore(storeName, metaData);
} catch (Throwable th) {
throw new BackingStoreException("Exception during createBackingStore", th);
}
}
return store;