/** * Instantiate <i>the default</i> {@link DataStore}. Uses default properties. Uses 'null' schema. * * Note: * consider that default dataStore is always visible * * @param keyClass The key class. * @param persistent The value class. * @param conf {@link Configuration} to be used be the store. * @return A new store instance. * @throws GoraException */ @SuppressWarnings("unchecked") public static <K, T extends Persistent> DataStore<K, T> getDataStore( Class<K> keyClass, Class<T> persistent, Configuration conf) throws GoraException { Properties createProps = createProps(); Class<? extends DataStore<K, T>> c; try { c = (Class<? extends DataStore<K, T>>) Class.forName(getDefaultDataStore(createProps)); } catch (Exception ex) { throw new GoraException(ex); } return createDataStore(c, keyClass, persistent, conf, createProps, null); }
/** * Instantiate <i>the default</i> {@link DataStore}. Uses default properties. Uses 'null' schema. * * Note: * consider that default dataStore is always visible * * @param keyClass The key class. * @param persistent The value class. * @param conf {@link Configuration} to be used be the store. * @return A new store instance. * @throws GoraException */ @SuppressWarnings("unchecked") public static <K, T extends Persistent> DataStore<K, T> getDataStore( Class<K> keyClass, Class<T> persistent, Configuration conf) throws GoraException { Properties createProps = createProps(); Class<? extends DataStore<K, T>> c; try { c = (Class<? extends DataStore<K, T>>) Class.forName(getDefaultDataStore(createProps)); } catch (Exception ex) { throw new GoraException(ex); } return createDataStore(c, keyClass, persistent, conf, createProps, null); }
c = (Class<? extends DataStore<K, T>>) Class.forName(getDefaultCacheDataStore(createProps)); } else { c = (Class<? extends DataStore<K, T>>) Class.forName(getDefaultDataStore(createProps));
c = (Class<? extends DataStore<K, T>>) Class.forName(getDefaultCacheDataStore(createProps)); } else { c = (Class<? extends DataStore<K, T>>) Class.forName(getDefaultDataStore(createProps));