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:
HierarchicalTableImpl,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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceOpaque interface for objects used to cache snapshot state across multiple invocations ofsnapshot(SnapshotState, Table, ColumnName, BitSet, RowSequence, WritableChunk[]). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteKey table action value specifying that a node should be contracted.static final byteKey table action value specifying that a node should be expanded.static final byteKey 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 acontractionor 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 thedefinitionsfor all available columns that may be requested in a snapshot.Get a description of this HierarchicalTable.Get a re-usable, static keyTablewith zero rows that will cause a snapshot to expand only the default nodes.getRoot()Get the rootTablethat represents the top level of this HierarchicalTable.Get the name of a column that denotes row depth.Get the name of a column ofBooleansthat denotes whether a row is expanded (or expandable).Get the sourceTablethat was aggregated to make this HierarchicalTable.List<ColumnDefinition<?>>Get thedefinitionsfor all structural columns.Make a re-usable snapshot state.longsnapshot(@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, withoutAttributesMethods inherited from interface io.deephaven.engine.table.GridAttributes
clearSortingRestrictions, restrictSortTo, setLayoutHints, withColumnDescription, withColumnDescriptions, withDescriptionMethods 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 acontractionor 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 sourceTablethat was aggregated to make this HierarchicalTable.- Returns:
- The source table
-
getRoot
Table getRoot()Get the rootTablethat represents the top level of this HierarchicalTable.- Returns:
- The root table
-
getEmptyExpansionsTable
Table getEmptyExpansionsTable()Get a re-usable, static keyTablewith zero rows that will cause a snapshot to expand only the default nodes.- Returns:
- An empty key
Tablefor default expansions
-
getRowExpandedColumn
ColumnName getRowExpandedColumn()Get the name of a column ofBooleansthat denotes whether a row is expanded (or expandable). It takes on the valuenullfor rows that are not expandable,falsefor expandable but unexpanded rows, andtruefor 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 thedefinitionsfor 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 columnand 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 thedefinitionsfor 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
definitionsfor 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 forthisHierarchicalTable if thesourceisRefreshing, 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 ofbyteonkeyTablethat 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,nullto include all columnsrows- Position-space rows to include from the expanded data specified bykeyTabledestinations- The destinationchunks- Returns:
- The total expanded data size or an estimate thereof
-