Package org.glassfish.grizzly.http2
Class Node
java.lang.Object
org.glassfish.grizzly.http2.Node
N-ary tree node implementation to support HTTP/2 stream hierarchies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Nodeprotected final intprotected Nodeprotected Nodeprotected Nodeprotected static final ReentrantReadWriteLock.ReadLockprotected static final ReentrantReadWriteLock.WriteLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd a child to thisNode.protected voidAdd a new child.protected voidaddSibling(Node sibling) Add a sibling to thisNode.protected Nodedetach(int id) Detail thisNodefrom the tree maintaining any children.protected voidMark thisNodeas exclusive.protected Nodefind(int id) Top down search from thisNodeand any children (recursively) returning the node with a matchingid.protected Noderemove(int id) Remove thisNodefrom the tree.
-
Field Details
-
readLock
-
writeLock
-
id
protected final int id -
next
-
prev
-
parent
-
firstChild
-
exclusive
protected boolean exclusive
-
-
Constructor Details
-
Node
protected Node(int id)
-
-
Method Details
-
exclusive
protected void exclusive()Mark thisNodeas exclusive. Any siblings will be migrated to the children list. -
addSibling
Add a sibling to thisNode. -
addChild
Add a child to thisNode. -
addChild
Add a new child. If the child is marked as exclusive, any other children will be moved to become the children of this exclusive child. -
detach
Detail thisNodefrom the tree maintaining any children. -
remove
-
find
Top down search from thisNodeand any children (recursively) returning the node with a matchingid.
-