@@ -135,35 +135,35 @@ static VALUE cluster_keyspace(VALUE self, VALUE keyspace)
135
135
}
136
136
137
137
/**
138
- * Sets the timeout for connecting to a node .
139
- * Default is +5000+ milliseconds .
138
+ * Sets the protocol version. The driver will automatically downgrade to the lowest supported protocol version .
139
+ * Default is +PROTOCOL_VERSION_V4+ .
140
140
*
141
141
* @param timeout_ms [Integer] A connect timeout in milliseconds.
142
142
* @return [Cassandra::Cluster] self.
143
143
*/
144
- static VALUE cluster_connect_timeout (VALUE self , VALUE timeout_ms )
144
+ static VALUE cluster_protocol_version (VALUE self , VALUE version )
145
145
{
146
146
CassandraCluster * cassandra_cluster ;
147
147
148
148
GET_CLUSTER (self , cassandra_cluster );
149
- cass_cluster_set_connect_timeout (cassandra_cluster -> cluster , NUM2UINT ( timeout_ms ));
149
+ cass_cluster_set_protocol_version (cassandra_cluster -> cluster , NUM2INT ( version ));
150
150
151
151
return self ;
152
152
}
153
153
154
154
/**
155
- * Sets the protocol version. The driver will automatically downgrade to the lowest supported protocol version .
156
- * Default is +PROTOCOL_VERSION_V4+ .
155
+ * Sets the timeout for connecting to a node .
156
+ * Default is +5000+ milliseconds .
157
157
*
158
158
* @param timeout_ms [Integer] A connect timeout in milliseconds.
159
159
* @return [Cassandra::Cluster] self.
160
160
*/
161
- static VALUE cluster_protocol_version (VALUE self , VALUE version )
161
+ static VALUE cluster_connect_timeout (VALUE self , VALUE timeout_ms )
162
162
{
163
163
CassandraCluster * cassandra_cluster ;
164
164
165
165
GET_CLUSTER (self , cassandra_cluster );
166
- cass_cluster_set_protocol_version (cassandra_cluster -> cluster , NUM2INT ( version ));
166
+ cass_cluster_set_connect_timeout (cassandra_cluster -> cluster , NUM2UINT ( timeout_ms ));
167
167
168
168
return self ;
169
169
}
0 commit comments