Interface HierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>
- All Superinterfaces:
AttributeMap<IFACE_TYPE>
,GridAttributes<IFACE_TYPE>
,LivenessReferent
- All Known Subinterfaces:
RollupTable
,TreeTable
- All Known Implementing Classes:
RollupTableImpl
,TreeTableImpl
public interface HierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>
extends AttributeMap<IFACE_TYPE>, GridAttributes<IFACE_TYPE>, LivenessReferent
Base interface for the results of operations that produce a hierarchy of table nodes.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Opaque interface for objects used to cache snapshot state across multiple invocations ofsnapshot(SnapshotState, Table, ColumnName, BitSet, RowSequence, WritableChunk[])
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
Key table action value specifying that a node should be contracted.static final byte
Key table action value specifying that a node should be expanded.static final byte
Key table action value specifying that a node should be expanded, and that its descendants should all be expanded unless they are included in the key table with acontraction
or their parent is included with asimple expansion
.Fields inherited from interface io.deephaven.engine.table.GridAttributes
COLUMN_DESCRIPTIONS_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, LAYOUT_HINTS_ATTRIBUTE, SORTABLE_COLUMNS_ATTRIBUTE
-
Method Summary
Modifier and TypeMethodDescriptionList<ColumnDefinition<?>>
Get thedefinitions
for all available columns that may be requested in a snapshot.Get a description of this HierarchicalTable.Get a re-usable, static keyTable
with zero rows that will cause a snapshot to expand only the default nodes.getRoot()
Get the rootTable
that represents the top level of this HierarchicalTable.Get the name of a column that denotes row depth.Get the name of a column ofBooleans
that denotes whether a row is expanded (or expandable).Get the sourceTable
that was aggregated to make this HierarchicalTable.List<ColumnDefinition<?>>
Get thedefinitions
for all structural columns.Make a re-usable snapshot state.long
snapshot
(@NotNull HierarchicalTable.SnapshotState snapshotState, @NotNull Table keyTable, @Nullable ColumnName keyTableActionColumn, @Nullable BitSet columns, @NotNull RowSequence rows, @NotNull WritableChunk<? super Values>[] destinations) Take a snapshot of the data in the grid defined bycolumns
,rows
, and the directives inkeyTable
.Methods inherited from interface io.deephaven.engine.table.AttributeMap
getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, retainingAttributes, withAttributes, withAttributes, withoutAttributes
Methods inherited from interface io.deephaven.engine.table.GridAttributes
clearSortingRestrictions, restrictSortTo, setLayoutHints, withColumnDescription, withColumnDescriptions, withDescription
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
-
Field Details
-
KEY_TABLE_ACTION_EXPAND
static final byte KEY_TABLE_ACTION_EXPANDKey table action value specifying that a node should be expanded. This is the default action if no action column is specified.- See Also:
-
KEY_TABLE_ACTION_EXPAND_ALL
static final byte KEY_TABLE_ACTION_EXPAND_ALLKey table action value specifying that a node should be expanded, and that its descendants should all be expanded unless they are included in the key table with acontraction
or their parent is included with asimple expansion
.- See Also:
-
KEY_TABLE_ACTION_CONTRACT
static final byte KEY_TABLE_ACTION_CONTRACTKey table action value specifying that a node should be contracted. The node must descend from a node that wasexpanded with its descendants
, or this key table row will have no effect.- See Also:
-
-
Method Details
-
getDescription
String getDescription()Get a description of this HierarchicalTable.- Returns:
- The description
-
getSource
Table getSource()Get the sourceTable
that was aggregated to make this HierarchicalTable.- Returns:
- The source table
-
getRoot
Table getRoot()Get the rootTable
that represents the top level of this HierarchicalTable.- Returns:
- The root table
-
getEmptyExpansionsTable
Table getEmptyExpansionsTable()Get a re-usable, static keyTable
with zero rows that will cause a snapshot to expand only the default nodes.- Returns:
- An empty key
Table
for default expansions
-
getRowExpandedColumn
ColumnName getRowExpandedColumn()Get the name of a column ofBooleans
that denotes whether a row is expanded (or expandable). It takes on the valuenull
for rows that are not expandable,false
for expandable but unexpanded rows, andtrue
for expanded rows. This column is "synthetic"; that is, it's not part of the data, but rather calculated as part of snapshotting.- Returns:
- The name of a column that denotes whether a row is expanded or expandable
-
getRowDepthColumn
ColumnName getRowDepthColumn()Get the name of a column that denotes row depth. This column is "synthetic"; that is, it's not part of the data, but rather calculated as part of snapshotting.- Returns:
- The name of a column that denotes row depth
-
getStructuralColumnDefinitions
List<ColumnDefinition<?>> getStructuralColumnDefinitions()Get thedefinitions
for all structural columns. Structural columns are synthetic columns that allow snapshot consumers to make sense of the relationship between rows, and should always be included in the requested columns set when snapshotting a HierarchicalTable. This list includes therow-depth column
and therow-expanded column
, but never includes type-specific node-level columns.- Returns:
- A list of @link ColumnDefinition definitions} for all structural columns
-
getAvailableColumnDefinitions
List<ColumnDefinition<?>> getAvailableColumnDefinitions()Get thedefinitions
for all available columns that may be requested in a snapshot.The result will always begin with the
structural columns
, which are then followed by type-specific node-level columns.- Returns:
- A list of
definitions
for all available columns that may be requested in a snapshot
-
makeSnapshotState
HierarchicalTable.SnapshotState makeSnapshotState()Make a re-usable snapshot state. The result will ensure liveness forthis
HierarchicalTable if thesource
isRefreshing
, and callers must similarly retain the result for the duration of their usage under the same conditions. -
snapshot
long snapshot(@NotNull @NotNull HierarchicalTable.SnapshotState snapshotState, @NotNull @NotNull Table keyTable, @Nullable @Nullable ColumnName keyTableActionColumn, @Nullable @Nullable BitSet columns, @NotNull @NotNull RowSequence rows, @NotNull @NotNull WritableChunk<? super Values>[] destinations) Take a snapshot of the data in the grid defined bycolumns
,rows
, and the directives inkeyTable
. Accumulate the results indestinations
.- Parameters:
snapshotState
- Snapshot state object used to cache data across invocations. Must have been created by this HierarchicalTable withmakeSnapshotState()
.keyTable
- Type-specific "key" table specifying expanded and contracted nodeskeyTableActionColumn
- The name of a column ofbyte
onkeyTable
that specifies whether nodes should beexpanded
,expanded with their descendants
, orcontracted
. Ifnull
, all rows are treated assimple expansions
.columns
- Optional bit-set of columns to include,null
to include all columnsrows
- Position-space rows to include from the expanded data specified bykeyTable
destinations
- The destinationchunks
- Returns:
- The total expanded data size or an estimate thereof
-