// This parameter enables/disables Nagle's algorithm on connections.
// The default is true.
- "tcp-nodelay": true
+ "tcp-nodelay": true,
+
+ // This parameter configures consistency level. The default is "quorum".
+ "consistency": "quorum",
+
+ // This parameter configures serial consistency level which manages
+ // lightweight transaction isolation. The default is "serial".
+ "serial-consistency": "serial"
},
// Addresses will be assigned with a lifetime of 4000 seconds.
// This parameter enables/disables Nagle's algorithm on connections.
// The default is true.
- "tcp-nodelay": true
+ "tcp-nodelay": true,
+
+ // This parameter configures consistency level. The default is "quorum".
+ "consistency": "quorum",
+
+ // This parameter configures serial consistency level which manages
+ // lightweight transaction isolation. The default is "serial".
+ "serial-consistency": "serial"
},
// Addresses will be assigned with preferred and valid lifetimes
algorithm on connections. The default is true.
</simpara></listitem>
+ <listitem><simpara>
+ <command>consistency</command> - configures consistency level.
+ The default is "quorum".
+ </simpara></listitem>
+
+ <listitem><simpara>
+ <command>serial-consistency</command> - configures serial consistency
+ level which manages lightweight transaction isolation. The default is
+ "serial".
+ </simpara></listitem>
+
</itemizedlist>
</para>
/// values specified in parentheses):
/// - keyspace: name of the database to which to connect (keatest)
/// - contact-points: IP addresses of the nodes to connect to (127.0.0.1)
+ /// - consistency: consistency level (quorum)
+ /// - serial-consistency: serial consistency level (serial)
/// - port: The TCP port to use (9042)
/// - user - credentials to use when connecting (no username)
/// - password - credentials to use when connecting (no password)
public:
/// @brief Constructor
///
- /// Uses the following keywords in the parameters passed to it to connect
- /// to the database:
- /// - keyspace
- /// - host
- /// - user
- /// - password
- /// - contact-points
- /// - reconnect-wait-time
- /// - connect-timeout
- /// - request-timeout
- /// - tcp-keepalive
- /// - tcp-nodelay
+ /// Uses the following keywords in the parameters passed to it to
+ /// connect to the Cassandra cluster (if omitted, defaults specified in
+ /// parentheses):
+ /// - keyspace: name of the database to which to connect (keatest)
+ /// - contact-points: IP addresses of the nodes to connect to (127.0.0.1)
+ /// - consistency: consistency level (quorum)
+ /// - serial-consistency: serial consistency level (serial)
+ /// - port: The TCP port to use (9042)
+ /// - user - credentials to use when connecting (no username)
+ /// - password - credentials to use when connecting (no password)
+ /// - reconnect-wait-time 2000
+ /// - connect-timeout 5000
+ /// - request-timeout 12000
+ /// - tcp-keepalive no
+ /// - tcp-nodelay no
///
/// For details regarding those paraemters, see
/// @ref isc::db::CqlConnection::openDatabase.
/// Uses the following keywords in the parameters passed to it to
/// connect to the Cassandra cluster (if omitted, defaults specified in
/// parentheses):
- /// - name - Name of the keyspace to to connect to ("keatest")
- /// - contact-points - IP addresses to connect ("127.0.0.1")
- /// - user - Username under which to connect (empty)
- /// - password - Password for "user" on the database (empty)
- /// - port - TCP port (9042)
- /// - reconnect-wait-time (2000)
- /// - connect-timeout (5000)
- /// - request-timeout (12000)
- /// - tcp-keepalive (no)
- /// - tcp-nodelay (no)
+ /// - keyspace: name of the database to which to connect (keatest)
+ /// - contact-points: IP addresses of the nodes to connect to (127.0.0.1)
+ /// - consistency: consistency level (quorum)
+ /// - serial-consistency: serial consistency level (serial)
+ /// - port: The TCP port to use (9042)
+ /// - user - credentials to use when connecting (no username)
+ /// - password - credentials to use when connecting (no password)
+ /// - reconnect-wait-time 2000
+ /// - connect-timeout 5000
+ /// - request-timeout 12000
+ /// - tcp-keepalive no
+ /// - tcp-nodelay no
///
/// Finally, all the CQL commands are pre-compiled.
///
if (keyspace) {
result->set("keyspace", keyspace);
}
+ ConstElementPtr consistency = getItem(xpath + "/consistency");
+ if (consistency) {
+ result->set("consistency", consistency);
+ }
+ ConstElementPtr serial_consistency = getItem(xpath + "/serial-consistency");
+ if (serial_consistency) {
+ result->set("serial-consistency", serial_consistency);
+ }
ConstElementPtr max_reconnect = getItem(xpath + "/max-reconnect-tries");
if (max_reconnect) {
result->set("max-reconnect-tries", max_reconnect);
if (keyspace) {
setItem(xpath + "/keyspace", keyspace, SR_STRING_T);
}
+ ConstElementPtr consistency = elem->get("consistency");
+ if (consistency) {
+ setItem(xpath + "/consistency", consistency, SR_STRING_T);
+ }
+ ConstElementPtr serial_consistency = elem->get("serial-consistency");
+ if (serial_consistency) {
+ setItem(xpath + "/serial-consistency", serial_consistency, SR_STRING_T);
+ }
ConstElementPtr max_reconnect = elem->get("max-reconnect-tries");
if (max_reconnect) {
setItem(xpath + "/max-reconnect-tries", max_reconnect, SR_UINT32_T);
/// "connect-timeout": <connect timeout>,
/// "contact-points": <contact points>,
/// "keyspace": <keyspace>,
+/// "consistency": <consistency>,
+/// "serial-consistency": <serial-consistency>,
/// "max-reconnect-tries": <maximum reconnect tries>,
/// "reconnect-wait-time": <reconnect wait time>,
/// "request-timeout": <request timeout>,
/// +--rw connect-timeout? uint32
/// +--rw contact-points? string
/// +--rw keyspace? string
+/// +--rw consistency? string
+/// +--rw serial-consistency? string
/// +--rw max-reconnect-tries? uint32
/// +--rw reconnect-wait-time? uint32
/// +--rw request-timeout? uint32
description "Cassandra database keyspace (this is Cassandra's equivalent
of a database name).";
}
+ leaf consistency {
+ type string;
+ description "Consistency level.";
+ }
+ leaf serial-consistency {
+ type string;
+ description "Serial consistency level which manages lightweight
+ transaction isolation.";
+ }
leaf max-reconnect-tries {
type uint32;
description "Maximum of recovery attempts before exit.";