Search in sources :

Example 1 with PointValueDaoDefinition

use of com.serotonin.m2m2.db.PointValueDaoDefinition in project ma-core-public by MangoAutomation.

the class MangoRuntimeContextConfiguration method pointValueDao.

@Bean
public PointValueDao pointValueDao(List<PointValueDaoDefinition> definitions) {
    PointValueDaoDefinition highestPriority = definitions.stream().findFirst().orElseThrow();
    highestPriority.initialize();
    if (log.isInfoEnabled()) {
        log.info("Time series database {} initialized", highestPriority.getClass().getSimpleName());
    }
    return highestPriority.getPointValueDao();
}
Also used : PointValueDaoDefinition(com.serotonin.m2m2.db.PointValueDaoDefinition) Bean(org.springframework.context.annotation.Bean)

Example 2 with PointValueDaoDefinition

use of com.serotonin.m2m2.db.PointValueDaoDefinition in project ma-core-public by infiniteautomation.

the class MangoRuntimeContextConfiguration method pointValueDao.

@Bean
public PointValueDao pointValueDao(List<PointValueDaoDefinition> definitions) {
    PointValueDaoDefinition highestPriority = definitions.stream().findFirst().orElseThrow();
    highestPriority.initialize();
    if (log.isInfoEnabled()) {
        log.info("Time series database {} initialized", highestPriority.getClass().getSimpleName());
    }
    return highestPriority.getPointValueDao();
}
Also used : PointValueDaoDefinition(com.serotonin.m2m2.db.PointValueDaoDefinition) Bean(org.springframework.context.annotation.Bean)

Aggregations

PointValueDaoDefinition (com.serotonin.m2m2.db.PointValueDaoDefinition)2 Bean (org.springframework.context.annotation.Bean)2