Class RingTableTools
java.lang.Object
io.deephaven.engine.table.impl.sources.ring.RingTableTools
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Table
Equivalent toof(parent, capacity, true)
.static Table
Constructs a "ring" table, whereby the latestcapacity
rows from theparent
are retained and re-indexed by the resulting ring table.static Table
Constructs a "ring" table, where the next-power-of-2capacity
from theparent
are retained and re-indexed, with an additionalTableOperations.tail(long)
to restructure forcapacity
.
-
Constructor Details
-
RingTableTools
public RingTableTools()
-
-
Method Details
-
of
Equivalent toof(parent, capacity, true)
.- Parameters:
parent
- the parentcapacity
- the capacity- Returns:
- the ring table
- See Also:
-
of
Constructs a "ring" table, whereby the latestcapacity
rows from theparent
are retained and re-indexed by the resulting ring table. Latest is determined solely by theTableUpdate.added()
updates,TableUpdate.removed()
are ignored; andTableUpdate.modified()
/TableUpdate.shifted()
are not expected. In particular, this is a useful construction withblink tables
which do not retain their own data for more than an update cycle.- Parameters:
parent
- the parentcapacity
- the capacityinitialize
- if the resulting table should source initial data from the snapshot ofparent
- Returns:
- the ring table
-
of2
Constructs a "ring" table, where the next-power-of-2capacity
from theparent
are retained and re-indexed, with an additionalTableOperations.tail(long)
to restructure forcapacity
.Logically equivalent to
of(parent, MathUtil.roundUpPowerOf2(capacity), initialize).tail(capacity)
.This setup may be useful when consumers need to maximize random access fill speed from a ring table.
- Parameters:
parent
- the parentcapacity
- the capacityinitialize
- if the resulting table should source initial data from the snapshot ofparent
- Returns:
- the ring table
- See Also:
-