/** The streamvelocity dictates how fast we want this stream (slower = cheaper) */ public void setStreamVelocity(String sid, StreamVelocity sv) { bidStrategy.setStreamVelocity(sid, sv); // After the velocity is changed, we might want to inc/dec our bid to our sources for (LCPair lcp : scm.getListenConns(sid)) { buyMgr.possiblyRebid(lcp.getCC().getNodeId()); } }
public List<String> getConnectedSources(String sid) { LCPair[] arrr = scm.getListenConns(sid); List<String> result = new ArrayList<String>(); for (LCPair lcp : arrr) { result.add(lcp.getCC().getNodeId()); } return result; }
public void setAllStreamVelocitiesExcept(String streamId, StreamVelocity sv) { String[] receivingSids = streamMgr.getReceivingStreamIds(); // After the velocity is changed, we might want to inc/dec our bid to our sources Set<String> rebidNodeIds = new HashSet<String>(); for (String sid : receivingSids) { if (!sid.equals(streamId)) { bidStrategy.setStreamVelocity(sid, sv); for (LCPair lcp : scm.getListenConns(sid)) { rebidNodeIds.add(lcp.getCC().getNodeId()); } } } for (String nodeId : rebidNodeIds) { buyMgr.possiblyRebid(nodeId); } }