/** * Gets information about who is consuming the outputs of the specified component, and how. * * @return Map from stream id to component id to the Grouping used. */ public Map<String, Map<String, Grouping>> getTargets(String componentId) { Map<String, Map<String, Grouping>> ret = new HashMap<>(); for (String otherComponentId : getComponentIds()) { Map<GlobalStreamId, Grouping> inputs = getComponentCommon(otherComponentId).get_inputs(); for (Map.Entry<GlobalStreamId, Grouping> entry : inputs.entrySet()) { GlobalStreamId id = entry.getKey(); if (id.get_componentId().equals(componentId)) { Map<String, Grouping> curr = ret.get(id.get_streamId()); if (curr == null) { curr = new HashMap<>(); } curr.put(otherComponentId, entry.getValue()); ret.put(id.get_streamId(), curr); } } } return ret; }
/** * Gets information about who is consuming the outputs of the specified component, * and how. * * @return Map from stream id to component id to the Grouping used. */ public Map<String, Map<String, Grouping>> getTargets(String componentId) { Map<String, Map<String, Grouping>> ret = new HashMap<>(); for(String otherComponentId: getComponentIds()) { Map<GlobalStreamId, Grouping> inputs = getComponentCommon(otherComponentId).get_inputs(); for(Map.Entry<GlobalStreamId, Grouping> entry: inputs.entrySet()) { GlobalStreamId id = entry.getKey(); if(id.get_componentId().equals(componentId)) { Map<String, Grouping> curr = ret.get(id.get_streamId()); if(curr==null) curr = new HashMap<>(); curr.put(otherComponentId, entry.getValue()); ret.put(id.get_streamId(), curr); } } } return ret; }