Java 类org.springframework.boot.autoconfigure.cassandra.CassandraProperties 实例源码

项目:Armory    文件:CassandraConfiguration.java   
private QueryOptions getQueryOptions(CassandraProperties properties) {
    QueryOptions options = new QueryOptions();
    if (properties.getConsistencyLevel() != null) {
        options.setConsistencyLevel(properties.getConsistencyLevel());
    }
    if (properties.getSerialConsistencyLevel() != null) {
        options.setSerialConsistencyLevel(properties.getSerialConsistencyLevel());
    }
    options.setFetchSize(properties.getFetchSize());
    return options;
}
项目:xm-gate    文件:CassandraConfiguration.java   
private static QueryOptions getQueryOptions(CassandraProperties properties) {
    QueryOptions options = new QueryOptions();
    if (properties.getConsistencyLevel() != null) {
        options.setConsistencyLevel(properties.getConsistencyLevel());
    }
    if (properties.getSerialConsistencyLevel() != null) {
        options.setSerialConsistencyLevel(properties.getSerialConsistencyLevel());
    }
    options.setFetchSize(properties.getFetchSize());
    return options;
}
项目:xm-ms-timeline    文件:CassandraConfiguration.java   
private QueryOptions getQueryOptions(CassandraProperties properties) {
    QueryOptions options = new QueryOptions();
    if (properties.getConsistencyLevel() != null) {
        options.setConsistencyLevel(properties.getConsistencyLevel());
    }
    if (properties.getSerialConsistencyLevel() != null) {
        options.setSerialConsistencyLevel(properties.getSerialConsistencyLevel());
    }
    options.setFetchSize(properties.getFetchSize());
    return options;
}
项目:xm-ms-timeline    文件:CassandraTestConfiguration.java   
/**
 * Override how to get the port to connect to the Cassandra cluster
 * When deployed, the port is read by properties
 * For the tests we need to read the port dynamically to discover on which random port Cassandra-unit has started the
 * embedded cluster
 * @param properties
 * @return
 */
@Override
protected int getPort(CassandraProperties properties) {
    int port = properties.getPort();
    if (port == 0) {
        // random port for the tests
        int randomPort = DatabaseDescriptor.getNativeTransportPort();
        log.info("Starting the cassandra cluster connection to a random port for the tests: {}", randomPort);
        return randomPort;
    } else {
        return port;
    }
}
项目:devoxxus-jhipster-microservices-demo    文件:CassandraConfiguration.java   
private QueryOptions getQueryOptions(CassandraProperties properties) {
    QueryOptions options = new QueryOptions();
    if (properties.getConsistencyLevel() != null) {
        options.setConsistencyLevel(properties.getConsistencyLevel());
    }
    if (properties.getSerialConsistencyLevel() != null) {
        options.setSerialConsistencyLevel(properties.getSerialConsistencyLevel());
    }
    options.setFetchSize(properties.getFetchSize());
    return options;
}
项目:Microservices-with-JHipster-and-Spring-Boot    文件:CassandraConfiguration.java   
private QueryOptions getQueryOptions(CassandraProperties properties) {
    QueryOptions options = new QueryOptions();
    if (properties.getConsistencyLevel() != null) {
        options.setConsistencyLevel(properties.getConsistencyLevel());
    }
    if (properties.getSerialConsistencyLevel() != null) {
        options.setSerialConsistencyLevel(properties.getSerialConsistencyLevel());
    }
    options.setFetchSize(properties.getFetchSize());
    return options;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CassandraDataAutoConfiguration.java   
public CassandraDataAutoConfiguration(BeanFactory beanFactory,
        CassandraProperties properties, Cluster cluster, Environment environment) {
    this.beanFactory = beanFactory;
    this.properties = properties;
    this.cluster = cluster;
    this.propertyResolver = new RelaxedPropertyResolver(environment,
            "spring.data.cassandra.");
}
项目:Thesis-JHipster    文件:_CassandraConfiguration.java   
private QueryOptions getQueryOptions(CassandraProperties properties) {
    QueryOptions options = new QueryOptions();
    if (properties.getConsistencyLevel() != null) {
        options.setConsistencyLevel(properties.getConsistencyLevel());
    }
    if (properties.getSerialConsistencyLevel() != null) {
        options.setSerialConsistencyLevel(properties.getSerialConsistencyLevel());
    }
    options.setFetchSize(properties.getFetchSize());
    return options;
}
项目:generator-jhipster    文件:_CassandraConfiguration.java   
private QueryOptions getQueryOptions(CassandraProperties properties) {
    QueryOptions options = new QueryOptions();
    if (properties.getConsistencyLevel() != null) {
        options.setConsistencyLevel(properties.getConsistencyLevel());
    }
    if (properties.getSerialConsistencyLevel() != null) {
        options.setSerialConsistencyLevel(properties.getSerialConsistencyLevel());
    }
    options.setFetchSize(properties.getFetchSize());
    return options;
}
项目:generator-jhipster    文件:_CassandraConfiguration.java   
private SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    if (nonNull(properties.getConnectTimeout())) {
        options.setConnectTimeoutMillis((int) properties.getConnectTimeout().toMillis());
    }
    if (nonNull(properties.getConnectTimeout())) {
        options.setReadTimeoutMillis((int) properties.getReadTimeout().toMillis());
    }
    return options;
}
项目:generator-jhipster    文件:_CassandraTestConfiguration.java   
/**
 * Override how to get the port to connect to the Cassandra cluster
 * When deployed, the port is read by properties
 * For the tests we need to read the port dynamically to discover on which random port Cassandra-unit has started the
 * embedded cluster
 * @param properties
 * @return
 */
@Override
protected int getPort(CassandraProperties properties) {
    int port = properties.getPort();
    if (port == 0) {
        // random port for the tests
        int randomPort = DatabaseDescriptor.getNativeTransportPort();
        log.info("Starting the cassandra cluster connection to a random port for the tests: {}", randomPort);
        return randomPort;
    } else {
        return port;
    }
}
项目:Armory    文件:CassandraConfiguration.java   
protected int getPort(CassandraProperties properties) {
    return properties.getPort();
}
项目:Armory    文件:CassandraConfiguration.java   
private SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
项目:Armory    文件:CassandraConfiguration.java   
@Bean(destroyMethod = "close")
public Session session(CassandraProperties properties, Cluster cluster) {
    log.debug("Configuring Cassandra session");
    return StringUtils.hasText(properties.getKeyspaceName()) ? cluster.connect(properties.getKeyspaceName()) : cluster.connect();
}
项目:xm-gate    文件:CassandraConfiguration.java   
protected int getPort(CassandraProperties properties) {
    return properties.getPort();
}
项目:xm-gate    文件:CassandraConfiguration.java   
private static SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
项目:xm-gate    文件:CassandraConfiguration.java   
@Bean(destroyMethod = "close")
public Session session(CassandraProperties properties, Cluster cluster) {
    log.debug("Configuring Cassandra session");
    return StringUtils.hasText(properties.getKeyspaceName()) ? cluster.connect(properties.getKeyspaceName())
        : cluster.connect();
}
项目:xm-ms-timeline    文件:CassandraConfiguration.java   
protected int getPort(CassandraProperties properties) {
    return properties.getPort();
}
项目:xm-ms-timeline    文件:CassandraConfiguration.java   
private SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
项目:devoxxus-jhipster-microservices-demo    文件:CassandraConfiguration.java   
protected int getPort(CassandraProperties properties) {
    return properties.getPort();
}
项目:devoxxus-jhipster-microservices-demo    文件:CassandraConfiguration.java   
private SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
项目:devoxxus-jhipster-microservices-demo    文件:CassandraConfiguration.java   
@Bean(destroyMethod = "close")
public Session session(CassandraProperties properties, Cluster cluster) {
    log.debug("Configuring Cassandra session");
    return StringUtils.hasText(properties.getKeyspaceName()) ? cluster.connect(properties.getKeyspaceName()) : cluster.connect();
}
项目:Microservices-with-JHipster-and-Spring-Boot    文件:CassandraConfiguration.java   
protected int getPort(CassandraProperties properties) {
    return properties.getPort();
}
项目:Microservices-with-JHipster-and-Spring-Boot    文件:CassandraConfiguration.java   
private SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
项目:Microservices-with-JHipster-and-Spring-Boot    文件:CassandraConfiguration.java   
@Bean(destroyMethod = "close")
public Session session(CassandraProperties properties, Cluster cluster) {
    log.debug("Configuring Cassandra session");
    return StringUtils.hasText(properties.getKeyspaceName()) ? cluster.connect(properties.getKeyspaceName()) : cluster.connect();
}
项目:Thesis-JHipster    文件:_CassandraConfiguration.java   
private SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
项目:Thesis-JHipster    文件:_CassandraConfiguration.java   
@Bean(destroyMethod = "close")
public Session session(CassandraProperties properties, Cluster cluster) {
    log.debug("Configuring Cassandra session");
    return StringUtils.hasText(properties.getKeyspaceName()) ? cluster.connect(properties.getKeyspaceName()) : cluster.connect();
}
项目:spring-boot-concourse    文件:CassandraDataAutoConfiguration.java   
public CassandraDataAutoConfiguration(CassandraProperties properties,
        Cluster cluster) {
    this.properties = properties;
    this.cluster = cluster;
}
项目:cf-cassandra-spring-example-app    文件:CassandraConnectionFactory.java   
public CassandraProperties getProperties() {
    if (activeProperties == null) setActiveProperty();
    return activeProperties;
}
项目:generator-jhipster    文件:_CassandraConfiguration.java   
protected int getPort(CassandraProperties properties) {
    return properties.getPort();
}
项目:generator-jhipster    文件:_CassandraConfiguration.java   
@Bean(destroyMethod = "close")
public Session session(CassandraProperties properties, Cluster cluster) {
    log.debug("Configuring Cassandra session");
    return StringUtils.hasText(properties.getKeyspaceName()) ? cluster.connect(properties.getKeyspaceName()) : cluster.connect();
}