Database-Cassandra-Client

 view release on metacpan or  search on metacpan

Client.pm  view on Meta::CPAN


Sets the timeout for connecting to a node.  Default: 5000 milliseconds 

Return: undef


=head3 cluster_set_request_timeout

 $cass->cluster_set_request_timeout($timeout_ms);

Sets the timeout for waiting for a response from a node.  Default: 12000 milliseconds 

Return: undef


=head3 cluster_set_credentials

 $cass->cluster_set_credentials($username, $password);

Sets credentials for plain text authentication. 

Return: undef


=head3 cluster_set_load_balance_round_robin

 $cass->cluster_set_load_balance_round_robin();

Configures the cluster to use round-robin load balancing.  The driver discovers all nodes in a cluster and cycles through them per request. All are considered 'local'. 

Return: undef


=head3 cluster_set_load_balance_dc_aware

 my $int_CassError = $cass->cluster_set_load_balance_dc_aware($local_dc, $used_hosts_per_remote_dc, $allow_remote_dcs_for_local_cl);

Configures the cluster to use DC-aware load balancing. For each query, all live nodes in a primary 'local' DC are tried first, followed by any node from other DCs.  Note: This is the default, and does not need to be called unless switching an existin...

Return: CASS_OK if successful, otherwise an error occurred


=head3 cluster_set_token_aware_routing

 $cass->cluster_set_token_aware_routing($enabled);

Configures the cluster to use Token-aware request routing, or not.  Default is cass_true (enabled).  This routing policy composes the base routing policy, routing requests first to replicas on nodes considered 'local' by the base load balancing polic...

Return: undef


=head3 cluster_set_tcp_nodelay

 $cass->cluster_set_tcp_nodelay($enable);

Enable/Disable Nagel's algorithm on connections.  Default: cass_false (disabled). 

Return: undef


=head3 cluster_set_tcp_keepalive

 $cass->cluster_set_tcp_keepalive($enable, $delay_secs);

Enable/Disable TCP keep-alive  Default: cass_false (disabled). 

Return: undef


=head2 Session

=head3 session_new

 my $obj_CassSession = $cass->session_new();

Creates a new session. 

Return: obj_CassSession


=head3 session_free

 $cass->session_free($session);

Frees a session instance. If the session is still connected it will be syncronously closed before being deallocated.  Important: Do not free a session in a future callback. Freeing a session in a future callback will cause a deadlock. 

Return: undef


=head3 session_connect

 my $obj_CassFuture = $cass->session_connect($session);

Connects a session. 

Return: obj_CassFuture


=head3 session_connect_keyspace

 my $obj_CassFuture = $cass->session_connect_keyspace($session, $keyspace);

Connects a session and sets the keyspace. 

Return: obj_CassFuture


=head3 session_close

 my $obj_CassFuture = $cass->session_close($session);

Closes the session instance, outputs a close future which can be used to determine when the session has been terminated. This allows in-flight requests to finish. 

Return: obj_CassFuture


=head3 session_prepare

 my $obj_CassFuture = $cass->session_prepare($session, $query);

Create a prepared statement. 

Return: obj_CassFuture




( run in 2.568 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )