Class HierarchicalTableImpl<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>,IMPL_TYPE extends HierarchicalTableImpl<IFACE_TYPE,IMPL_TYPE>>
java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
io.deephaven.engine.liveness.ReferenceCountedLivenessNode
io.deephaven.engine.liveness.LivenessArtifact
io.deephaven.engine.table.impl.LiveAttributeMap<IFACE_TYPE,IMPL_TYPE>
io.deephaven.engine.table.impl.BaseGridAttributes<IFACE_TYPE,IMPL_TYPE>
io.deephaven.engine.table.impl.hierarchical.HierarchicalTableImpl<IFACE_TYPE,IMPL_TYPE>
- All Implemented Interfaces:
LogOutputAppendable,LivenessManager,LivenessNode,LivenessReferent,AttributeMap<IFACE_TYPE>,GridAttributes<IFACE_TYPE>,HierarchicalTable<IFACE_TYPE>,Serializable
- Direct Known Subclasses:
RollupTableImpl,TreeTableImpl
public abstract class HierarchicalTableImpl<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>,IMPL_TYPE extends HierarchicalTableImpl<IFACE_TYPE,IMPL_TYPE>>
extends BaseGridAttributes<IFACE_TYPE,IMPL_TYPE>
implements HierarchicalTable<IFACE_TYPE>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.hierarchical.HierarchicalTable
HierarchicalTable.SnapshotState -
Field Summary
Fields inherited from interface io.deephaven.engine.table.GridAttributes
COLUMN_DESCRIPTIONS_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, LAYOUT_HINTS_ATTRIBUTE, SORTABLE_COLUMNS_ATTRIBUTEFields inherited from interface io.deephaven.engine.table.hierarchical.HierarchicalTable
KEY_TABLE_ACTION_CONTRACT, KEY_TABLE_ACTION_EXPAND, KEY_TABLE_ACTION_EXPAND_ALL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHierarchicalTableImpl(@NotNull Map<String, Object> initialAttributes, @NotNull QueryTable source, @NotNull QueryTable root) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcheckAvailableColumns(@NotNull Collection<String> columns) Check this grid to ensure that allcolumnsare present.static voidcheckRebaseDefinition(String type, @NotNull Table existingTable, @NotNull Table newSource) Check that the table we are rebasing to has the same definition as the current table, producing a helpful error message.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(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 class io.deephaven.engine.table.impl.BaseGridAttributes
clearSortingRestrictions, getSortableColumns, restrictSortTo, setColumnDescriptions, setLayoutHints, setSortableColumns, withColumnDescription, withColumnDescriptions, withDescriptionMethods inherited from class io.deephaven.engine.table.impl.LiveAttributeMap
copy, copyAttributes, getAttribute, getAttributeKeys, getAttributes, getAttributes, hasAttribute, prepareReturnCopy, prepareReturnThis, published, retainingAttributes, setAttribute, setAttribute, withAttributes, withAttributes, withoutAttributesMethods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScopeMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
destroy, dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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.table.hierarchical.HierarchicalTable
getAvailableColumnDefinitions, getDescription, getEmptyExpansionsTableMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanageMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
-
Constructor Details
-
HierarchicalTableImpl
protected HierarchicalTableImpl(@NotNull @NotNull Map<String, Object> initialAttributes, @NotNull @NotNull QueryTable source, @NotNull @NotNull QueryTable root)
-
-
Method Details
-
checkRebaseDefinition
public static void checkRebaseDefinition(String type, @NotNull @NotNull Table existingTable, @NotNull @NotNull Table newSource) Check that the table we are rebasing to has the same definition as the current table, producing a helpful error message.- Parameters:
type- the type of engine object that is being rebasedexistingTable- the existing source tablenewSource- the new source table
-
getSource
Description copied from interface:HierarchicalTableGet the sourceTablethat was aggregated to make this HierarchicalTable.- Specified by:
getSourcein interfaceHierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>- Returns:
- The source table
-
getRoot
Description copied from interface:HierarchicalTableGet the rootTablethat represents the top level of this HierarchicalTable.- Specified by:
getRootin interfaceHierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>- Returns:
- The root table
-
getRowExpandedColumn
Description copied from interface:HierarchicalTableGet 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.- Specified by:
getRowExpandedColumnin interfaceHierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>- Returns:
- The name of a column that denotes whether a row is expanded or expandable
-
getRowDepthColumn
Description copied from interface:HierarchicalTableGet 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.- Specified by:
getRowDepthColumnin interfaceHierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>- Returns:
- The name of a column that denotes row depth
-
getStructuralColumnDefinitions
Description copied from interface:HierarchicalTableGet 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.- Specified by:
getStructuralColumnDefinitionsin interfaceHierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>- Returns:
- A list of @link ColumnDefinition definitions} for all structural columns
-
makeSnapshotState
Description copied from interface:HierarchicalTableMake 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.- Specified by:
makeSnapshotStatein interfaceHierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>
-
checkAvailableColumns
Description copied from class:BaseGridAttributesCheck this grid to ensure that allcolumnsare present.- Specified by:
checkAvailableColumnsin classBaseGridAttributes<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>,IMPL_TYPE extends HierarchicalTableImpl<IFACE_TYPE, IMPL_TYPE>> - Parameters:
columns- The column names to check
-
snapshot
public long snapshot(@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) Description copied from interface:HierarchicalTableTake a snapshot of the data in the grid defined bycolumns,rows, and the directives inkeyTable. Accumulate the results indestinations.- Specified by:
snapshotin interfaceHierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>- Parameters:
snapshotState- Snapshot state object used to cache data across invocations. Must have been created by this HierarchicalTable withHierarchicalTable.makeSnapshotState().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
-