Function cassandra_cpp_sys::cass_cluster_set_blacklist_filtering [] [src]

pub unsafe extern "C" fn cass_cluster_set_blacklist_filtering(
    cluster: *mut CassCluster,
    hosts: *const c_char
)

Sets/Appends blacklist hosts. The first call sets the blacklist hosts and any subsequent calls appends additional hosts. Passing an empty string will clear and disable the blacklist. White space is striped from the hosts.

This policy filters requests to all other policies, only allowing requests to the hosts not contained in the blacklist. Any host in the blacklist will be ignored and a connection will not be established. This policy is useful for ensuring that the driver will not connect to a predefined set of hosts.

Examples: "127.0.0.1" "127.0.0.1,127.0.0.2"

@public @memberof CassCluster

@param[in] cluster @param[in] hosts A comma delimited list of addresses. An empty string will clear the blacklist hosts. The string is copied into the cluster configuration; the memory pointed to by this parameter can be freed after this call.