@Override public List<String> getAllFilterIDs() { return getFilterIdsIndex(FILTER_ID + ZuulApplicationInfo.getApplicationName()); }
@Override public List<String> getAllFilterIDs() { return getFilterIdsIndex(FILTER_ID + ZuulApplicationInfo.getApplicationName()); }
private void removeFilterIdFromIndex(String index, String filter_id) { List<String> filters = getFilterIdsIndex(index); if (filters.contains(filter_id)) { filters.remove(filter_id); String filterList = toFilterList(filters); cassandraGateway.updateFilterIndex(index, filterList); } }
private void removeFilterIdFromIndex(String index, String filter_id) { List<String> filters = getFilterIdsIndex(index); if (filters.contains(filter_id)) { filters.remove(filter_id); String filterList = toFilterList(filters); cassandraGateway.updateFilterIndex(index, filterList); } }
public List<FilterInfo> getFiltersForIndex(String index) { List<String> filterInfoList = getFilterIdsIndex(index); if (filterInfoList.isEmpty()) { return Collections.emptyList(); } Rows<String, String> result = cassandraGateway.getByFilterIds(filterInfoList); if (result == null || result.isEmpty()) { return Collections.emptyList(); } else { List<FilterInfo> filterInfos = new ArrayList<FilterInfo>(); Iterator<Row<String, String>> rows = result.iterator(); while (rows.hasNext()) { Row<String, String> row = rows.next(); FilterInfo script = getFilterScriptFromCassandraRow(row); if (script != null) { filterInfos.add(script); } } Collections.sort(filterInfos); return filterInfos; } }
public List<FilterInfo> getFiltersForIndex(String index) { List<String> filterInfoList = getFilterIdsIndex(index); if (filterInfoList.isEmpty()) { return Collections.emptyList(); } Rows<String, String> result = cassandraGateway.getByFilterIds(filterInfoList); if (result == null || result.isEmpty()) { return Collections.emptyList(); } else { List<FilterInfo> filterInfos = new ArrayList<FilterInfo>(); Iterator<Row<String, String>> rows = result.iterator(); while (rows.hasNext()) { Row<String, String> row = rows.next(); FilterInfo script = getFilterScriptFromCassandraRow(row); if (script != null) { filterInfos.add(script); } } Collections.sort(filterInfos); return filterInfos; } }
List<String> filterIds = getFilterIdsIndex(FILTER_ID + ZuulApplicationInfo.getApplicationName()); if (!filterIds.contains(filter_id)) { addFilterIdToIndex(FILTER_ID + ZuulApplicationInfo.getApplicationName(), filter_id);
List<String> filterIds = getFilterIdsIndex(FILTER_ID + ZuulApplicationInfo.getApplicationName()); if (!filterIds.contains(filter_id)) { addFilterIdToIndex(FILTER_ID + ZuulApplicationInfo.getApplicationName(), filter_id);