public void priorityFrame(int streamId, int streamDependency, int weight, boolean exlusive) { Http2PriorityNode existing = nodesByID.get(streamId); if(existing == null) { return; } int dif = weight - existing.weighting; existing.parent.totalWeights += dif; existing.weighting = weight; if(exlusive) { Http2PriorityNode newParent = nodesByID.get(streamDependency); if(newParent != null) { existing.parent.removeDependent(existing); newParent.exclusive(existing); } } else if(existing.parent.streamId != streamDependency) { Http2PriorityNode newParent = nodesByID.get(streamDependency); if(newParent != null) { newParent.addDependent(existing); } } }
/** * Resisters a stream, with its dependency and dependent information * @param streamId The stream id * @param dependency The stream this stream depends on, if no stream is specified this should be zero * @param weighting The weighting. If no weighting is specified this should be 16 */ public void registerStream(int streamId, int dependency, int weighting, boolean exclusive) { final Http2PriorityNode node = new Http2PriorityNode(streamId, weighting); if(exclusive) { Http2PriorityNode existing = nodesByID.get(dependency); if(existing != null) { existing.exclusive(node); } } else { Http2PriorityNode existing = nodesByID.get(dependency); if(existing != null) { existing.addDependent(node); } } nodesByID.put(streamId, node); }
/** * Resisters a stream, with its dependency and dependent information * @param streamId The stream id * @param dependency The stream this stream depends on, if no stream is specified this should be zero * @param weighting The weighting. If no weighting is specified this should be 16 */ public void registerStream(int streamId, int dependency, int weighting, boolean exclusive) { final Http2PriorityNode node = new Http2PriorityNode(streamId, weighting); if(exclusive) { Http2PriorityNode existing = nodesByID.get(dependency); if(existing != null) { existing.exclusive(node); } } else { Http2PriorityNode existing = nodesByID.get(dependency); if(existing != null) { existing.addDependent(node); } } nodesByID.put(streamId, node); }
/** * Resisters a stream, with its dependency and dependent information * @param streamId The stream id * @param dependency The stream this stream depends on, if no stream is specified this should be zero * @param weighting The weighting. If no weighting is specified this should be 16 */ public void registerStream(int streamId, int dependency, int weighting, boolean exclusive) { final Http2PriorityNode node = new Http2PriorityNode(streamId, weighting); if(exclusive) { Http2PriorityNode existing = nodesByID.get(dependency); if(existing != null) { existing.exclusive(node); } } else { Http2PriorityNode existing = nodesByID.get(dependency); if(existing != null) { existing.addDependent(node); } } nodesByID.put(streamId, node); }
public void priorityFrame(int streamId, int streamDependency, int weight, boolean exlusive) { Http2PriorityNode existing = nodesByID.get(streamId); if(existing == null) { return; } int dif = weight - existing.weighting; existing.parent.totalWeights += dif; existing.weighting = weight; if(exlusive) { Http2PriorityNode newParent = nodesByID.get(streamDependency); if(newParent != null) { existing.parent.removeDependent(existing); newParent.exclusive(existing); } } else if(existing.parent.streamId != streamDependency) { Http2PriorityNode newParent = nodesByID.get(streamDependency); if(newParent != null) { newParent.addDependent(existing); } } }
public void priorityFrame(int streamId, int streamDependency, int weight, boolean exlusive) { Http2PriorityNode existing = nodesByID.get(streamId); if(existing == null) { return; } int dif = weight - existing.weighting; existing.parent.totalWeights += dif; existing.weighting = weight; if(exlusive) { Http2PriorityNode newParent = nodesByID.get(streamDependency); if(newParent != null) { existing.parent.removeDependent(existing); newParent.exclusive(existing); } } else if(existing.parent.streamId != streamDependency) { Http2PriorityNode newParent = nodesByID.get(streamDependency); if(newParent != null) { newParent.addDependent(existing); } } }