Function cassandra_cpp_sys::cass_cluster_set_whitelist_filtering [] [src]

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

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

This policy filters requests to all other policies, only allowing requests to the hosts contained in the whitelist. Any host not in the whitelist will be ignored and a connection will not be established. This policy is useful for ensuring that the driver will only 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 whitelist hosts. The string is copied into the cluster configuration; the memory pointed to by this parameter can be freed after this call.