當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。