pub unsafe extern "C" fn cass_execution_profile_set_whitelist_filtering(
    profile: *mut CassExecProfile,
    hosts: *const c_char
) -> CassError
Expand description

Sets/Appends whitelist hosts for the execution profile. 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”

Note: Execution profiles use the cluster-level load balancing policy unless enabled. This setting is not applicable unless a load balancing policy is enabled on the execution profile.

@public @memberof CassExecProfile

@param[in] profile @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. @return CASS_OK if successful, otherwise an error occurred.

@see cass_cluster_set_whitelist_filtering()