Top Fields Constructors Methods
org.eclipse.jetty.http3.qpack.internal.table

public Class DynamicTable

extends Object
implements Iterable<Entry>, Dumpable
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.util.component.Dumpable, java.lang.Iterable
Imports
java.io.IOException, java.util.ArrayList, .HashMap, .Iterator, .List, .Map, org.eclipse.jetty.http.HttpField, org.eclipse.jetty.util.component.Dumpable

Field Summary

Modifier and TypeField and Description
private int
private int
private int
private final List<Entry>
private final Map<HttpField, Entry>
private final Map<String, Entry>
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(Entry
the entry to insert.
entry
)

Add an entry into the Dynamic Table.

public boolean

Returns:

if an entry with this HttpField can be inserted.
canInsert
(HttpField
the HttpField to insert into the table.
field
)

Is there enough room to insert a new entry into the Dynamic Table, possibly evicting unreferenced entries.

public boolean
public void
dump(Appendable out, String indent)

Implements org.eclipse.jetty.util.component.Dumpable.dump.

Dump this object (and children) into an Appendable using the provided indent after any new lines.

public Entry
get(int index)

public Entry
get(String name)

public Entry
get(HttpField field)

public Entry

Returns:

the entry with the absolute index.
getAbsolute
(int
the absolute index of the entry in the table.
absoluteIndex
)

Get an entry from the Dynamic table given an absolute index.

public int
public int
protected int

Returns:

the smallest absolute index that is allowed to be referenced.
getDrainingIndex
()

Entries with indexes lower than the draining index should not be referenced.

public int
public int
public int
public int
public int

Returns:

the relative index of this entry.
index
(Entry
the entry to find the relative index of.
entry
)

Get the relative index of an entry in the Dynamic Table.

public Iterator<Entry>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public void
setCapacity(int capacity)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_absoluteIndexback to summary
private int _absoluteIndex
_capacityback to summary
private int _capacity
_drainingIndexback to summary
private int _drainingIndex
_entriesback to summary
private final List<Entry> _entries
_fieldMapback to summary
private final Map<HttpField, Entry> _fieldMap
_nameMapback to summary
private final Map<String, Entry> _nameMap
_sizeback to summary
private int _size

Constructor Detail

DynamicTableback to summary
public DynamicTable()

Method Detail

addback to summary
public void add(Entry entry)

Add an entry into the Dynamic Table. This will throw if it is not possible to insert this entry. Use canInsert(HttpField) to check whether it is possible to insert this entry.

Parameters
entry:Entry

the entry to insert.

canInsertback to summary
public boolean canInsert(HttpField field)

Is there enough room to insert a new entry into the Dynamic Table, possibly evicting unreferenced entries.

Parameters
field:HttpField

the HttpField to insert into the table.

Returns:boolean

if an entry with this HttpField can be inserted.

canReferenceback to summary
public boolean canReference(Entry entry)
dumpback to summary
public void dump(Appendable out, String indent) throws IOException

Implements org.eclipse.jetty.util.component.Dumpable.dump.

Doc from org.eclipse.jetty.util.component.Dumpable.dump.

Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.

Annotations
@Override
Exceptions
IOException:
if unable to write to Appendable
getback to summary
public Entry get(int index)
getback to summary
public Entry get(String name)
getback to summary
public Entry get(HttpField field)
getAbsoluteback to summary
public Entry getAbsolute(int absoluteIndex)

Get an entry from the Dynamic table given an absolute index.

Parameters
absoluteIndex:int

the absolute index of the entry in the table.

Returns:Entry

the entry with the absolute index.

getBaseback to summary
public int getBase()
getCapacityback to summary
public int getCapacity()
getDrainingIndexback to summary
protected int getDrainingIndex()

Entries with indexes lower than the draining index should not be referenced. This allows these entries to eventually be evicted as no more references will be made to them.

Returns:int

the smallest absolute index that is allowed to be referenced.

getInsertCountback to summary
public int getInsertCount()
getNumEntriesback to summary
public int getNumEntries()
getSizeback to summary
public int getSize()
getSpaceback to summary
public int getSpace()
indexback to summary
public int index(Entry entry)

Get the relative index of an entry in the Dynamic Table.

Parameters
entry:Entry

the entry to find the relative index of.

Returns:int

the relative index of this entry.

iteratorback to summary
public Iterator<Entry> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override
setCapacityback to summary
public void setCapacity(int capacity)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override