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

pack-priv final Class BundleQueue<E>

extends Object
Class Inheritance
Imports
java.util.LinkedList

The queue of element bundles. Each bundle in the queue may be empty or have some elements.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final LinkedList<BundleQueue.Record<E>>
private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(final int
the bundle to which the specified element will be added.
bundle
,
final E
the element to add.
element
)

Add the element to the specified bundle.

public boolean
hasNext()

Returns true if there is available element in the current bundle.

public E
next()

Returns next available element in the current bundle.

public boolean

Returns:

true if next bundle exists and is not empty
nextBundle
()

Switches to the next bundle in the queue, all the unread elements from the previously active bundle will be removed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

internalQueueback to summary
private final LinkedList<BundleQueue.Record<E>> internalQueue
lastElementAbsoluteDistanceback to summary
private int lastElementAbsoluteDistance

Constructor Detail

BundleQueueback to summary
pack-priv BundleQueue()

Method Detail

addback to summary
public void add(final int bundle, final E element)

Add the element to the specified bundle. The bundle is represented by its order in the queue. It is not possible to add the element to a bundle, which already exists and is not the last bundle in the queue.

Parameters
bundle:int

the bundle to which the specified element will be added.

element:E

the element to add.

hasNextback to summary
public boolean hasNext()

Returns true if there is available element in the current bundle.

nextback to summary
public E next()

Returns next available element in the current bundle.

nextBundleback to summary
public boolean nextBundle()

Switches to the next bundle in the queue, all the unread elements from the previously active bundle will be removed.

Returns:boolean

true if next bundle exists and is not empty

org.glassfish.grizzly.http2 back to summary

private final Class BundleQueue.Record<E>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private final E

Constructor Summary

AccessConstructor and Description
public
Record(final E value, final int distance)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

distanceback to summary
private int distance
valueback to summary
private final E value

Constructor Detail

Recordback to summary
public Record(final E value, final int distance)