当前位置: 首页>>代码示例>>Java>>正文


Java CassandraProperties类代码示例

本文整理汇总了Java中org.springframework.boot.autoconfigure.cassandra.CassandraProperties的典型用法代码示例。如果您正苦于以下问题:Java CassandraProperties类的具体用法?Java CassandraProperties怎么用?Java CassandraProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CassandraProperties类属于org.springframework.boot.autoconfigure.cassandra包,在下文中一共展示了CassandraProperties类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getQueryOptions

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
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;
}
 
开发者ID:ElectronicArmory,项目名称:Armory,代码行数:12,代码来源:CassandraConfiguration.java

示例2: getQueryOptions

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
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;
}
 
开发者ID:xm-online,项目名称:xm-gate,代码行数:12,代码来源:CassandraConfiguration.java

示例3: getPort

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:xm-online,项目名称:xm-ms-timeline,代码行数:21,代码来源:CassandraTestConfiguration.java

示例4: CassandraDataAutoConfiguration

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
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.");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:CassandraDataAutoConfiguration.java

示例5: getSocketOptions

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
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;
}
 
开发者ID:jhipster,项目名称:generator-jhipster,代码行数:11,代码来源:_CassandraConfiguration.java

示例6: getPort

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
protected int getPort(CassandraProperties properties) {
    return properties.getPort();
}
 
开发者ID:ElectronicArmory,项目名称:Armory,代码行数:4,代码来源:CassandraConfiguration.java

示例7: getSocketOptions

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
private SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
 
开发者ID:ElectronicArmory,项目名称:Armory,代码行数:7,代码来源:CassandraConfiguration.java

示例8: session

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
@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();
}
 
开发者ID:ElectronicArmory,项目名称:Armory,代码行数:6,代码来源:CassandraConfiguration.java

示例9: getSocketOptions

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
private static SocketOptions getSocketOptions(CassandraProperties properties) {
    SocketOptions options = new SocketOptions();
    options.setConnectTimeoutMillis(properties.getConnectTimeoutMillis());
    options.setReadTimeoutMillis(properties.getReadTimeoutMillis());
    return options;
}
 
开发者ID:xm-online,项目名称:xm-gate,代码行数:7,代码来源:CassandraConfiguration.java

示例10: session

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
@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();
}
 
开发者ID:xm-online,项目名称:xm-gate,代码行数:7,代码来源:CassandraConfiguration.java

示例11: CassandraDataAutoConfiguration

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
public CassandraDataAutoConfiguration(CassandraProperties properties,
		Cluster cluster) {
	this.properties = properties;
	this.cluster = cluster;
}
 
开发者ID:philwebb,项目名称:spring-boot-concourse,代码行数:6,代码来源:CassandraDataAutoConfiguration.java

示例12: getProperties

import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; //导入依赖的package包/类
public CassandraProperties getProperties() {
    if (activeProperties == null) setActiveProperty();
    return activeProperties;
}
 
开发者ID:pivotal-cf,项目名称:cf-cassandra-spring-example-app,代码行数:5,代码来源:CassandraConnectionFactory.java


注:本文中的org.springframework.boot.autoconfigure.cassandra.CassandraProperties类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。