Search in sources :

Example 1 with SettingsBuilder

use of jakarta.nosql.Settings.SettingsBuilder in project jnosql-diana-driver by eclipse.

the class CouchDBDocumentConfiguration method get.

@Override
public CouchDBDocumentCollectionManagerFactory get() {
    Map<String, String> configuration = ConfigurationReader.from(FILE_CONFIGURATION);
    SettingsBuilder builder = Settings.builder();
    configuration.entrySet().forEach(e -> builder.put(e.getKey(), e.getValue()));
    return get(builder.build());
}
Also used : SettingsBuilder(jakarta.nosql.Settings.SettingsBuilder)

Example 2 with SettingsBuilder

use of jakarta.nosql.Settings.SettingsBuilder in project jnosql-diana-driver by eclipse.

the class HazelcastKeyValueConfiguration method get.

/**
 * Creates a {@link HazelcastBucketManagerFactory} from configuration map
 * @param configurations the configuration map
 * @return the HazelCastBucketManagerFactory instance
 * @throws NullPointerException when configurations is null
 */
public HazelcastBucketManagerFactory get(Map<String, String> configurations) throws NullPointerException {
    Objects.requireNonNull(configurations, "configurations is required");
    SettingsBuilder builder = Settings.builder();
    configurations.entrySet().forEach(e -> builder.put(e.getKey(), e.getValue()));
    return get(builder.build());
}
Also used : SettingsBuilder(jakarta.nosql.Settings.SettingsBuilder)

Example 3 with SettingsBuilder

use of jakarta.nosql.Settings.SettingsBuilder in project jnosql-diana-driver by eclipse.

the class RavenDBDocumentConfiguration method get.

private RavenDBDocumentCollectionManagerFactory get(Map<String, String> configurations) throws NullPointerException {
    requireNonNull(configurations, "configurations is required");
    SettingsBuilder builder = Settings.builder();
    configurations.entrySet().stream().forEach(e -> builder.put(e.getKey(), e.getValue()));
    return get(builder.build());
}
Also used : SettingsBuilder(jakarta.nosql.Settings.SettingsBuilder)

Example 4 with SettingsBuilder

use of jakarta.nosql.Settings.SettingsBuilder in project jnosql-diana-driver by eclipse.

the class RedisConfiguration method getManagerFactory.

/**
 * Creates a {@link RedisConfiguration} from map configuration
 *
 * @param configurations the map configuration
 * @return the RedisConfiguration instance
 */
public RedisBucketManagerFactory getManagerFactory(Map<String, String> configurations) {
    Objects.requireNonNull(configurations, "configurations is required");
    SettingsBuilder builder = Settings.builder();
    configurations.entrySet().forEach(e -> builder.put(e.getKey(), e.getValue()));
    return get(builder.build());
}
Also used : SettingsBuilder(jakarta.nosql.Settings.SettingsBuilder)

Example 5 with SettingsBuilder

use of jakarta.nosql.Settings.SettingsBuilder in project jnosql-diana-driver by eclipse.

the class MongoDBDocumentConfiguration method get.

/**
 * Creates a {@link MongoDBDocumentCollectionManagerFactory} from map configurations
 *
 * @param configurations the configurations map
 * @return a MongoDBDocumentCollectionManagerFactory instance
 * @throws NullPointerException when the configurations is null
 */
public MongoDBDocumentCollectionManagerFactory get(Map<String, String> configurations) throws NullPointerException {
    requireNonNull(configurations, "configurations is required");
    SettingsBuilder builder = Settings.builder();
    configurations.entrySet().forEach(e -> builder.put(e.getKey(), e.getValue()));
    return get(builder.build());
}
Also used : SettingsBuilder(jakarta.nosql.Settings.SettingsBuilder)

Aggregations

SettingsBuilder (jakarta.nosql.Settings.SettingsBuilder)10 Settings (jakarta.nosql.Settings)2 BeforeEach (org.junit.jupiter.api.BeforeEach)1