* filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
*/
public static long count_filtered(nitro_service service, String name, String filter) throws Exception{
tmtrafficpolicy_tmglobal_binding obj = new tmtrafficpolicy_tmglobal_binding();
obj.set_name(name);
options option = new options();
option.set_count(true);
option.set_filter(filter);
tmtrafficpolicy_tmglobal_binding[] response = (tmtrafficpolicy_tmglobal_binding[]) obj.getfiltered(service, option);
if (response != null) {
return response[0].__count;
}
return 0;