Class DynamicTable
java.lang.Object
org.eclipse.jetty.http3.qpack.internal.table.DynamicTable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an entry into the Dynamic Table.boolean
Is there enough room to insert a new entry into the Dynamic Table, possibly evicting unreferenced entries.boolean
canReference
(Entry entry) void
dump
(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.get
(int index) getAbsolute
(int absoluteIndex) Get an entry from the Dynamic table given an absolute index.int
getBase()
int
protected int
Entries with indexes lower than the draining index should not be referenced.int
int
int
getSize()
int
getSpace()
int
Get the relative index of an entry in the Dynamic Table.iterator()
void
setCapacity
(int capacity) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DynamicTable
public DynamicTable()
-
-
Method Details
-
add
Add an entry into the Dynamic Table. This will throw if it is not possible to insert this entry. UsecanInsert(HttpField)
to check whether it is possible to insert this entry.- Parameters:
entry
- the entry to insert.
-
canInsert
Is there enough room to insert a new entry into the Dynamic Table, possibly evicting unreferenced entries.- Parameters:
field
- the HttpField to insert into the table.- Returns:
- if an entry with this HttpField can be inserted.
-
index
Get the relative index of an entry in the Dynamic Table.- Parameters:
entry
- the entry to find the relative index of.- Returns:
- the relative index of this entry.
-
getAbsolute
Get an entry from the Dynamic table given an absolute index.- Parameters:
absoluteIndex
- the absolute index of the entry in the table.- Returns:
- the entry with the absolute index.
-
get
-
get
-
get
-
getBase
public int getBase() -
getSize
public int getSize() -
getCapacity
public int getCapacity() -
getSpace
public int getSpace() -
getNumEntries
public int getNumEntries() -
getInsertCount
public int getInsertCount() -
setCapacity
public void setCapacity(int capacity) -
canReference
-
getDrainingIndex
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:
- the smallest absolute index that is allowed to be referenced.
-
iterator
-
dump
Description copied from interface:Dumpable
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.- Specified by:
dump
in interfaceDumpable
- Parameters:
out
- The appendable to dump toindent
- The indent to apply after any new lines.- Throws:
IOException
- if unable to write to Appendable
-
toString
-