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


Java ConsistencyLevel.ONE属性代码示例

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


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

示例1: getDefaultReadConsistencyLevel

protected ConsistencyLevel getDefaultReadConsistencyLevel() {
    if (defaultReadConsistencyLevel == null) {
        if (readConsistencyLevel != null) {
            defaultReadConsistencyLevel = ConsistencyLevel.valueOf(readConsistencyLevel.toUpperCase());
        } else {
            defaultReadConsistencyLevel = ConsistencyLevel.ONE;
        }
    }
    return defaultReadConsistencyLevel;
}
 
开发者ID:osswangxining,项目名称:iotplatform,代码行数:10,代码来源:CassandraQueryOptions.java

示例2: getDefaultWriteConsistencyLevel

protected ConsistencyLevel getDefaultWriteConsistencyLevel() {
    if (defaultWriteConsistencyLevel == null) {
        if (writeConsistencyLevel != null) {
            defaultWriteConsistencyLevel = ConsistencyLevel.valueOf(writeConsistencyLevel.toUpperCase());
        } else {
            defaultWriteConsistencyLevel = ConsistencyLevel.ONE;
        }
    }
    return defaultWriteConsistencyLevel;
}
 
开发者ID:osswangxining,项目名称:iotplatform,代码行数:10,代码来源:CassandraQueryOptions.java

示例3: CassandraConfiguration

protected CassandraConfiguration()  {
	

try {
	seed = JavaConversions.asScalaBuffer(Arrays.asList(InetAddress.getByName("localhost")));
} catch (UnknownHostException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}
	
CassandraCluster cc =  new CassandraCluster(seed, 9042,null, 8000, 120000, 1000,6000, 
		new ProtocolOptions().getCompression().LZ4, ConsistencyLevel.ONE);
session = cc.session();

}
 
开发者ID:boontadata,项目名称:boontadata-streams,代码行数:15,代码来源:CassandraConfiguration.java

示例4: readConsistency

protected static ConsistencyLevel readConsistency(AuthzTrans trans, String table) {
	String prop = trans.getProperty(CASS_READ_CONSISTENCY+'.'+table);
	if(prop==null) {
		prop = trans.getProperty(CASS_READ_CONSISTENCY);
		if(prop==null) {
			return ConsistencyLevel.ONE; // this is Cassandra Default
		}
	}
	return ConsistencyLevel.valueOf(prop);
}
 
开发者ID:att,项目名称:AAF,代码行数:10,代码来源:CassDAOImpl.java

示例5: writeConsistency

protected static ConsistencyLevel writeConsistency(AuthzTrans trans, String table) {
	String prop = trans.getProperty(CASS_WRITE_CONSISTENCY+'.'+table);
	if(prop==null) {
		prop = trans.getProperty(CASS_WRITE_CONSISTENCY);
		if(prop==null) {
			return ConsistencyLevel.ONE; // this is Cassandra Default\
		}
	}
	return ConsistencyLevel.valueOf(prop);
}
 
开发者ID:att,项目名称:AAF,代码行数:10,代码来源:CassDAOImpl.java


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