public void streamRemoved ( int streamId ) { Http2PriorityNode node = nodesByID . get ( streamId ) ; if ( node == null ) { return ; } if ( ! node . hasDependents ( ) ) { //add to eviction queue int toEvict = evictionQueue [ evictionQueuePosition ] ; evictionQueue [ evictionQueuePosition ++ ] = streamId ; Http2PriorityNode nodeToEvict = nodesByID . get ( toEvict ) ; //we don't remove the node if it has since got dependents since it was put into the queue //as this is the whole reason we maintain the queue in the first place if ( nodeToEvict != null && ! nodeToEvict . hasDependents ( ) ) { nodesByID . remove ( toEvict ) ; } } }
Method that is invoked when a stream has been removed