Top Description Fields Constructors Methods
org.glassfish.grizzly.http2

public abstract Class Node

extends Object
Class Inheritance
Imports
java.util.concurrent.locks.ReentrantReadWriteLock

N-ary tree node implementation to support HTTP/2 stream hierarchies.

Field Summary

Modifier and TypeField and Description
protected boolean
protected Node
protected final int
private static final ReentrantReadWriteLock
protected Node
protected Node
protected Node
protected static final ReentrantReadWriteLock.ReadLock
protected static final ReentrantReadWriteLock.WriteLock

Constructor Summary

AccessConstructor and Description
protected
Node(final int id)

Method Summary

Modifier and TypeMethod and Description
protected void
addChild(final Node n)

Add a child to this Node.

protected void
addChild(final Node nodeBeingAddedAsChild, final boolean exclusive)

Add a new child.

protected void
addSibling(final Node sibling)

Add a sibling to this Node.

protected Node
detach(final int id)

Detail this Node from the tree maintaining any children.

protected void
exclusive()

Mark this Node as exclusive.

protected Node
find(final int id)

Top down search from this Node and any children (recursively) returning the node with a matching id.

private boolean
private boolean
private boolean
protected Node
remove(final int id)

Remove this Node from the tree.

private Node
remove(final int id, final boolean retainChildren)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

exclusiveback to summary
protected boolean exclusive
firstChildback to summary
protected Node firstChild
idback to summary
protected final int id
lockback to summary
private static final ReentrantReadWriteLock lock
nextback to summary
protected Node next
parentback to summary
protected Node parent
prevback to summary
protected Node prev
readLockback to summary
protected static final ReentrantReadWriteLock.ReadLock readLock
writeLockback to summary
protected static final ReentrantReadWriteLock.WriteLock writeLock

Constructor Detail

Nodeback to summary
protected Node(final int id)

Method Detail

addChildback to summary
protected void addChild(final Node n)

Add a child to this Node.

addChildback to summary
protected void addChild(final Node nodeBeingAddedAsChild, final boolean exclusive)

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.

addSiblingback to summary
protected void addSibling(final Node sibling)

Add a sibling to this Node.

detachback to summary
protected Node detach(final int id)

Detail this Node from the tree maintaining any children.

exclusiveback to summary
protected void exclusive()

Mark this Node as exclusive. Any siblings will be migrated to the children list.

findback to summary
protected Node find(final int id)

Top down search from this Node and any children (recursively) returning the node with a matching id.

hasSiblingsback to summary
private boolean hasSiblings()
isFirstSiblingback to summary
private boolean isFirstSibling()
isLastSiblingback to summary
private boolean isLastSibling()
removeback to summary
protected Node remove(final int id)

Remove this Node from the tree. Any children will be moved up as a child of the remove Node's parent.

removeback to summary
private Node remove(final int id, final boolean retainChildren)