本文整理汇总了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;
}
示例2: compression
import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public ProtocolOptions.Compression compression()
{
return ProtocolOptions.Compression.valueOf(compression);
}
示例3: getCompression
import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public ProtocolOptions.Compression getCompression() {
return compression;
}
示例4: setCompression
import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public void setCompression(ProtocolOptions.Compression compression) {
this.compression = compression;
}
示例5: setCompression
import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public void setCompression(ProtocolOptions.Compression compression) {
this.compression = compression;
}
示例6: getCompression
import com.datastax.driver.core.ProtocolOptions; //导入方法依赖的package包/类
public ProtocolOptions.Compression getCompression() {
return compression;
}
示例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());
}