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


Java ProtocolOptions.Compression方法代码示例

本文整理汇总了Java中com.datastax.driver.core.ProtocolOptions.Compression方法的典型用法代码示例。如果您正苦于以下问题:Java ProtocolOptions.Compression方法的具体用法?Java ProtocolOptions.Compression怎么用?Java ProtocolOptions.Compression使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.datastax.driver.core.ProtocolOptions的用法示例。


在下文中一共展示了ProtocolOptions.Compression方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ConstructorConfiguredCqlClientFactory

import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public ConstructorConfiguredCqlClientFactory(String hosts, String clusterName, ConsistencyLevel clusterConsistency,
                        ConsistencyLevel conditionalUpdateConsistency, ProtocolOptions.Compression compression) {
    this.hosts = hosts.split(",");
    this.clusterConsistencyLevel = clusterConsistency;
    if (conditionalUpdateConsistency != null){
        this.serialConsistencyLevel = conditionalUpdateConsistency;
    }
    if (clusterName != null) {
        this.clusterName = clusterName;
    }
    this.compression = compression;
}
 
开发者ID:hpcc-systems,项目名称:storm-cassandra-cql,代码行数:13,代码来源:ConstructorConfiguredCqlClientFactory.java

示例2: compression

import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public ProtocolOptions.Compression compression()
{
    return ProtocolOptions.Compression.valueOf(compression);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:SettingsMode.java

示例3: getCompression

import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public ProtocolOptions.Compression getCompression() {
    return compression;
}
 
开发者ID:pulsarIO,项目名称:realtime-analytics,代码行数:4,代码来源:CassandraConfig.java

示例4: setCompression

import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public void setCompression(ProtocolOptions.Compression compression) {
    this.compression = compression;
}
 
开发者ID:pulsarIO,项目名称:realtime-analytics,代码行数:4,代码来源:CassandraConfig.java

示例5: setCompression

import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public void setCompression(ProtocolOptions.Compression compression) {
	this.compression = compression;
}
 
开发者ID:nea,项目名称:vertx-mod-cassandra-persistor,代码行数:4,代码来源:CassandraPersistor.java

示例6: getCompression

import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public ProtocolOptions.Compression getCompression() {
	return compression;
}
 
开发者ID:nea,项目名称:vertx-mod-cassandra-persistor,代码行数:4,代码来源:CassandraPersistor.java

示例7: doParse

import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
@Override
protected void doParse(Element element, ParserContext parserContext,
		BeanDefinitionBuilder builder) {
	super.doParse(element, parserContext, builder);

	Element optionsElement = DomUtils.getChildElementByTagName(element,
			ELEMENT_CASSANDRA_OPTIONS);

	BeanDefinitionBuilder beanBuilder = BeanDefinitionBuilder
			.genericBeanDefinition(CassandraClusterConfig.class.getName());

	if (optionsElement != null) {
		String compressionString = optionsElement.getAttribute(COMPRESSION_ATTRIBUTE);
		if (!StringUtils.isEmpty(compressionString)) {
			ProtocolOptions.Compression compression = ProtocolOptions.Compression
					.valueOf(compressionString);
			beanBuilder.addPropertyValue("compression", compression);
		}

		String retryPolicyString = optionsElement
				.getAttribute(RETRY_POLICY_ATTRIBUTE);
		if (!StringUtils.isEmpty(retryPolicyString)) {
			beanBuilder.addPropertyReference("retryPolicy", retryPolicyString);
		}

		String loadBalancingPolicyString = optionsElement
				.getAttribute(LOAD_BALANCING_POLICY_ATTRIBUTE);
		if (!StringUtils.isEmpty(loadBalancingPolicyString)) {
			beanBuilder.addPropertyReference("loadBalancingPolicy",
					loadBalancingPolicyString);
		}

		String socketOptionsString = optionsElement
				.getAttribute(SOCKET_OPTIONS_ATTRIBUTE);
		if (!StringUtils.isEmpty(socketOptionsString)) {
			beanBuilder.addPropertyReference("socketOptions", socketOptionsString);
		}

		String reconnectionPolicyString = optionsElement
				.getAttribute(RECONNECTION_POLICY_ATTRIBUTE);
		if (!StringUtils.isEmpty(reconnectionPolicyString)) {
			beanBuilder.addPropertyReference("reconnectionPolicy",
					reconnectionPolicyString);
		}

	}

	builder.addConstructorArgValue(beanBuilder.getBeanDefinition());
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-connectors,代码行数:50,代码来源:CloudCassandraSessionParser.java


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