Class RingTableTools
java.lang.Object
io.deephaven.engine.table.impl.sources.ring.RingTableTools
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TableEquivalent toof(parent, capacity, true).static TableConstructs a "ring" table, whereby the latestcapacityrows from theparentare retained and re-indexed by the resulting ring table.static TableConstructs a "ring" table, where the next-power-of-2capacityfrom theparentare 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 latestcapacityrows from theparentare 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 tableswhich 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-2capacityfrom theparentare 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:
-