use of jakarta.nosql.keyvalue.KeyValueConfiguration in project jnosql-diana-driver by eclipse.
the class KeyValueEntityManagerFactoryTest method setUp.
@BeforeEach
public void setUp() {
KeyValueConfiguration configuration = new InfinispanKeyValueConfiguration();
managerFactory = configuration.get();
}
use of jakarta.nosql.keyvalue.KeyValueConfiguration in project jnosql-diana by eclipse.
the class BucketManagerFactoryConverter method success.
@Override
public BucketManagerFactory success(String value) {
final SettingsConverter settingsConverter = BeanManagers.getInstance(SettingsConverter.class);
Config config = BeanManagers.getInstance(Config.class);
final Settings settings = settingsConverter.convert(value);
String provider = value + ".provider";
final Class<?> configurationClass = config.getValue(provider, Class.class);
if (KeyValueConfiguration.class.isAssignableFrom(configurationClass)) {
final Reflections reflections = BeanManagers.getInstance(Reflections.class);
final KeyValueConfiguration configuration = (KeyValueConfiguration) reflections.newInstance(configurationClass);
return configuration.get(settings);
}
throw new ConfigurationException("The class " + configurationClass + " is not valid to " + KeyValueConfiguration.class);
}
Aggregations