Search in sources :

Example 1 with Controlconnection

use of org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Controlconnection in project spring-boot by spring-projects.

the class CassandraAutoConfiguration method mapControlConnectionOptions.

private void mapControlConnectionOptions(CassandraProperties properties, CassandraDriverOptions options) {
    PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
    Controlconnection controlProperties = properties.getControlconnection();
    map.from(controlProperties::getTimeout).asInt(Duration::toMillis).to((timeout) -> options.add(DefaultDriverOption.CONTROL_CONNECTION_TIMEOUT, timeout));
}
Also used : Controlconnection(org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Controlconnection) PropertyMapper(org.springframework.boot.context.properties.PropertyMapper)

Aggregations

Controlconnection (org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Controlconnection)1 PropertyMapper (org.springframework.boot.context.properties.PropertyMapper)1