Search in sources :

Example 1 with ColumnConfigurationAsync

use of org.jnosql.diana.api.column.ColumnConfigurationAsync in project jnosql-artemis by eclipse.

the class ColumnFamilyManagerFactoryProducer method gettColumnFamilyManagerAsyncFactory.

private <T extends ColumnFamilyManagerAsync> ColumnFamilyManagerAsyncFactory<T> gettColumnFamilyManagerAsyncFactory(InjectionPoint injectionPoint) {
    Annotated annotated = injectionPoint.getAnnotated();
    ConfigurationUnit annotation = getConfigurationUnit(injectionPoint, annotated).orElseThrow(() -> new IllegalStateException("The @ConfigurationUnit does not found"));
    ConfigurationSettingsUnit unit = configurationReader.get().read(annotation, ColumnConfigurationAsync.class);
    Class<ColumnConfigurationAsync> configurationClass = unit.<ColumnConfigurationAsync>getProvider().orElseThrow(() -> new IllegalStateException("The ColumnConfiguration provider is required in the configuration"));
    ColumnConfigurationAsync columnConfiguration = reflections.newInstance(configurationClass);
    return columnConfiguration.getAsync(unit.getSettings());
}
Also used : Annotated(javax.enterprise.inject.spi.Annotated) ConfigurationSettingsUnit(org.jnosql.artemis.ConfigurationSettingsUnit) ConfigurationUnit(org.jnosql.artemis.ConfigurationUnit) ColumnConfigurationAsync(org.jnosql.diana.api.column.ColumnConfigurationAsync)

Aggregations

Annotated (javax.enterprise.inject.spi.Annotated)1 ConfigurationSettingsUnit (org.jnosql.artemis.ConfigurationSettingsUnit)1 ConfigurationUnit (org.jnosql.artemis.ConfigurationUnit)1 ColumnConfigurationAsync (org.jnosql.diana.api.column.ColumnConfigurationAsync)1