@SuppressWarnings("unchecked") public Map<String, NamedList<Integer>> getCollectionNodesStatus() { Map<String, NamedList<Integer>> res = new HashMap<>(); NamedList<NamedList<Object>> cols = getCollectionStatus(); if( cols != null ) { for (Map.Entry<String,NamedList<Object>> e : cols) { if (e.getKey() != null) { res.put(e.getKey(), (NamedList<Integer>) (e.getValue().get("responseHeader"))); } } } return res; } }
@SuppressWarnings("unchecked") public Map<String, NamedList<Integer>> getCollectionNodesStatus() { Map<String, NamedList<Integer>> res = new HashMap<>(); NamedList<NamedList<Object>> cols = getCollectionStatus(); if( cols != null ) { for (Map.Entry<String,NamedList<Object>> e : cols) { if (e.getKey() != null) { res.put(e.getKey(), (NamedList<Integer>) (e.getValue().get("responseHeader"))); } } } return res; } }
@SuppressWarnings("unchecked") public Map<String, NamedList<Integer>> getCollectionCoresStatus() { Map<String, NamedList<Integer>> res = new HashMap<>(); NamedList<NamedList<Object>> cols = getCollectionStatus(); if( cols != null ) { for (Map.Entry<String, NamedList<Object>> e : cols) { NamedList<Object> item = e.getValue(); String core = (String) item.get("core"); if (core != null) { res.put(core, (NamedList<Integer>)item.get("responseHeader")); } } } return res; }
@SuppressWarnings("unchecked") public Map<String, NamedList<Integer>> getCollectionCoresStatus() { Map<String, NamedList<Integer>> res = new HashMap<>(); NamedList<NamedList<Object>> cols = getCollectionStatus(); if( cols != null ) { for (Map.Entry<String, NamedList<Object>> e : cols) { NamedList<Object> item = e.getValue(); String core = (String) item.get("core"); if (core != null) { res.put(core, (NamedList<Integer>)item.get("responseHeader")); } } } return res; }