Interface DynamicTable
- All Superinterfaces:
Deflatable<Table>,DynamicNode,LivenessManager,LivenessNode,LivenessReferent,com.fishlib.base.log.LogOutputAppendable,LongSizedDataStructure,NotificationQueue.Dependency,SystemicObject,Table
- All Known Implementing Classes:
AppendOnlyArrayBackedMutableTable,BaseTable,ConnectionAwareRemoteTable,DeferredViewTable,HierarchicalTable,InitialSnapshotTable,InMemoryTable,KeyedArrayBackedMutableTable,LiveQueryTable,NestedPartitionedDiskBackedTable,PartitionAwareSourceTable,PreemptiveUpdatesTable,QueryReplayGroupedTable,QueryTable,QueryTable.FilteredTable,RedefinableTable,ReplayGroupedFullTable,ReplayLastByGroupedTable,ReplayTable,ReplicatedTable,SimpleSourceTable,SourceTable,SplayedDiskBackedTable,SubscriptionSnapshotTable,TimeTable,UncoalescedTable,UpdatableTable,WrappedDelegatingTable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.tables.Table
Table.AsOfMatchRule, Table.GroupStrategy, Table.RenameFunction -
Field Summary
Fields inherited from interface com.illumon.iris.db.tables.Table
ACL_ATTRIBUTE, ADD_ONLY_TABLE_ATTRIBUTE, COLUMN_DESCRIPTIONS_ATTRIBUTE, COLUMN_RENDERERS_ATTRIBUTE, CUSTOM_ACTIONS_ATTRIBUTE, DO_NOT_MAKE_REMOTE_ATTRIBUTE, EMPTY_SOURCE_TABLE_ATTRIBUTE, FILTERABLE_COLUMNS_ATTRIBUTE, HIERARCHICAL_CHILDREN_TABLE_MAP_ATTRIBUTE, HIERARCHICAL_SOURCE_INFO_ATTRIBUTE, HIERARCHICAL_SOURCE_TABLE_ATTRIBUTE, INPUT_TABLE_ATTRIBUTE, KEY_COLUMNS_ATTRIBUTE, LAYOUT_HINTS_ATTRIBUTE, MERGED_TABLE_ATTRIBUTE, NON_DISPLAY_TABLE, PLUGIN_NAME, PREDEFINED_ROLLUP_ATTRIBUTE, PREEMPTIVE_VIEWPORT_TYPE, PREPARED_RLL_ATTRIBUTE, PREVIEW_PARENT_TABLE, REVERSE_LOOKUP_ATTRIBUTE, ROLLUP_LEAF_ATTRIBUTE, SNAPSHOT_VIEWPORT_TYPE, SORTABLE_COLUMNS_ATTRIBUTE, SORTED_COLUMNS_ATTRIBUTE, SYSTEMIC_TABLE_ATTRIBUTE, TABLE_DESCRIPTION_ATTRIBUTE, TOTALS_TABLE_ATTRIBUTE, TREE_TABLE_FILTER_REVERSE_LOOKUP_ATTRIBUTE, UNIQUE_KEYS_ATTRIBUTE, UNTRACKED_LASTBY_TABLE_ATTRIBUTE, VIEWPORT_TYPE_ATTRIBUTE, ZERO_LENGTH_TABLE_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionvoidWait for updates to this DynamicTable.booleanawaitUpdate(long timeout) Wait for updates to this DynamicTable.default booleanisFailed()voidlistenForDirectUpdates(Listener listener) Subscribe for updates to this table.default voidlistenForUpdates(Listener listener) Subscribe for updates to this table.voidlistenForUpdates(Listener listener, boolean replayInitialImage) Subscribe for updates to this table.voidlistenForUpdates(ShiftAwareListener listener) Subscribe for updates to this table.default ModifiedColumnSetnewModifiedColumnSet(String... columnNames) Retrieve theModifiedColumnSetthat will be used when propagating updates from this table.default ModifiedColumnSet.TransformerCreate a transformer that uses an identity mapping from one DynamicTable to another.default ModifiedColumnSet.TransformernewModifiedColumnSetIdentityTransformer(Map<String, ColumnSource> newColumns) Create a transformer that uses an identity mapping from one ColumnSourceMap to another.default ModifiedColumnSet.TransformernewModifiedColumnSetTransformer(DynamicTable resultTable, MatchPair... matchPairs) Create aModifiedColumnSet.Transformerthat can be used to propagate dirty columns from this table to listeners of the provided resultTable.default ModifiedColumnSet.TransformernewModifiedColumnSetTransformer(DynamicTable resultTable, String... columnNames) Create aModifiedColumnSet.Transformerthat can be used to propagate dirty columns from this table to listeners of the provided resultTable.default ModifiedColumnSet.TransformernewModifiedColumnSetTransformer(String[] columnNames, ModifiedColumnSet[] columnSets) Create aModifiedColumnSet.Transformerthat can be used to propagate dirty columns from this table to listeners of the table used to construct columnSets.voidInitiate update delivery to this table's listeners.default voidnotifyListeners(Index added, Index removed, Index modified) Initiate update delivery to this table's listeners.voidnotifyListenersOnError(Throwable e, UpdatePerformanceTracker.Entry sourceEntry) Initiate failure delivery to this table's listeners.voidremoveDirectUpdateListener(Listener listener) Unsubscribe the supplied listener.voidremoveUpdateListener(Listener listener) Unsubscribe the supplied listener.voidremoveUpdateListener(ShiftAwareListener listener) Unsubscribe the supplied listener.silent()Return an identical table that suppresses all downstream notificationsMethods inherited from interface com.illumon.iris.db.v2.DynamicNode
addParentReference, isRefreshing, setRefreshingMethods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manage, tryManageMethods inherited from interface com.illumon.iris.db.util.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReferenceMethods inherited from interface com.fishlib.base.log.LogOutputAppendable
appendMethods inherited from interface com.illumon.iris.db.util.LongSizedDataStructure
intSize, intSize, sizeMethods inherited from interface com.illumon.iris.db.tables.live.NotificationQueue.Dependency
satisfiedMethods inherited from interface com.illumon.iris.db.v2.SystemicObject
isSystemicObject, markSystemicMethods inherited from interface com.illumon.iris.db.tables.Table
absSumBy, absSumBy, absSumBy, absSumBy, aj, aj, aj, aj, aj, aj, apply, applyToAllBy, applyToAllBy, applyToAllBy, applyToAllBy, avgBy, avgBy, avgBy, avgBy, by, by, by, by, by, by, by, byExternal, byExternal, byteColumnIterator, characterColumnIterator, clearSortingRestrictions, close, coalesce, columnIterator, countBy, countBy, countBy, countBy, dateTimeColumnAsNanos, dateTimeColumnAsNanos, deflate, deflate, doubleColumnIterator, dropColumnFormats, dropColumns, dropColumns, exactJoin, exactJoin, exactJoin, exactJoin, exactJoin, firstBy, firstBy, firstBy, firstBy, flatten, floatColumnIterator, formatColumns, formatColumnWhere, formatRowWhere, getAttribute, getAttributeNames, getAttributes, getAttributes, getColumn, getColumn, getColumns, getColumnSource, getColumnSource, getColumnSourceMap, getColumnSources, getDefinition, getDescription, getIndex, getMeta, getRecord, getSubTable, getViewPort, hasAttribute, hasColumns, hasColumns, head, headBy, headBy, headBy, headPct, integerColumnIterator, isEmpty, isFlat, isLive, join, join, join, join, join, join, join, join, join, join, lastBy, lastBy, lastBy, lastBy, layoutHints, layoutHints, lazyUpdate, lazyUpdate, lazyUpdate, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, longColumnIterator, maxBy, maxBy, maxBy, maxBy, medianBy, medianBy, medianBy, medianBy, minBy, minBy, minBy, minBy, moveColumns, moveColumns, moveDownColumns, moveUpColumns, naturalJoin, naturalJoin, naturalJoin, naturalJoin, naturalJoin, preemptiveSnapshotTable, preemptiveSnapshotTable, preemptiveUpdatesTable, raj, raj, raj, raj, raj, raj, releaseCachedResources, renameAllColumns, renameColumns, renameColumns, renameColumns, restrictSortTo, reverse, rollup, rollup, rollup, rollup, rollup, rollup, rollup, rollup, select, select, select, select, selectDistinct, selectDistinct, selectDistinct, selectDistinct, setAttribute, setColumnRenderers, setTotalsTable, shortColumnIterator, sizeForInstrumentation, slice, snapshot, snapshot, snapshotHistory, snapshotIncremental, snapshotIncremental, sort, sort, sort, sortDescending, sortDescending, stdBy, stdBy, stdBy, stdBy, subscribeToPreemptiveUpdates, sumBy, sumBy, sumBy, sumBy, supportsPreemptiveSubscription, tail, tailBy, tailBy, tailBy, tailPct, treeTable, ungroup, ungroup, ungroup, ungroup, ungroupAllBut, update, update, update, updateBy, updateBy, updateBy, updateBy, updateBy, updateBy, updateView, updateView, updateView, validateSelect, validateSelect, varBy, varBy, varBy, varBy, view, view, view, wavgBy, wavgBy, wavgBy, wavgBy, where, where, where, where, whereIn, whereIn, whereIn, whereIn, whereNotIn, whereNotIn, whereOneOf, whereOneOf, whereOneOf, withColumnDescription, withColumnDescription, withKeys, withTableDescription, withUniqueKeys, wouldMatch, wouldMatch, wsumBy, wsumBy, wsumBy, wsumBy
-
Method Details
-
silent
Table silent()Return an identical table that suppresses all downstream notifications
WARNING: Use this feature responsibly. Even though updates are suppressed, that does not imply that the underlying column sources are necessarily static, and so reading data from the table may not be consistent. A safer approach is to use
Table.snapshot(Table, String...)orTable.snapshotIncremental(Table, String...)- Returns:
- a new
Tablethat does not propagate updates downstream.
-
awaitUpdate
Wait for updates to this DynamicTable.
In some implementations, this call may also terminate in case of interrupt or spurious wakeup (see java.util.concurrent.locks.Condition#await()).
- Throws:
InterruptedException- In the event this thread is interrupted
-
awaitUpdate
Wait for updates to this DynamicTable.
In some implementations, this call may also terminate in case of interrupt or spurious wakeup (see java.util.concurrent.locks.Condition#await()).
- Parameters:
timeout- The maximum time to wait in milliseconds.- Returns:
- false if the timeout elapses without notification, true otherwise.
- Throws:
InterruptedException- In the event this thread is interrupted
-
listenForUpdates
Subscribe for updates to this table. Listener will be invoked via the LiveTableMonitor notification queue associated with this DynamicTable.- Parameters:
listener- listener for updates
-
listenForUpdates
Subscribe for updates to this table. After the optional initial image, listener will be invoked via the LiveTableMonitor notification queue associated with this DynamicTable.- Parameters:
listener- listener for updatesreplayInitialImage- true to process updates for all initial rows in the table plus all new row changes; false to only process new row changes
-
listenForUpdates
Subscribe for updates to this table. Listener will be invoked via the LiveTableMonitor notification queue associated with this DynamicTable.- Parameters:
listener- listener for updates
-
listenForDirectUpdates
Subscribe for updates to this table. Direct listeners are invoked immediately when changes are published, rather than via a LiveTableMonitor notification queue.- Parameters:
listener- listener for updates
-
removeUpdateListener
Unsubscribe the supplied listener.- Parameters:
listener- listener for updates
-
removeUpdateListener
Unsubscribe the supplied listener.- Parameters:
listener- listener for updates
-
removeDirectUpdateListener
Unsubscribe the supplied listener.- Parameters:
listener- listener for updates
-
notifyListeners
Initiate update delivery to this table's listeners. Will notify direct listeners before completing, and enqueue notifications for all other listeners.- Parameters:
added- index values added to the tableremoved- index values removed from the tablemodified- index values modified in the table.
-
notifyListeners
Initiate update delivery to this table's listeners. Will notify direct listeners before completing, and enqueue notifications for all other listeners.- Parameters:
update- the set of table changes to propagate The caller gives this update object away; the invocation ofnotifyListenerstakes ownership, and will callreleaseon it once it is not used anymore; callers should pass aclonefor updates they intend to further use.
-
notifyListenersOnError
Initiate failure delivery to this table's listeners. Will notify direct listeners before completing, and enqueue notifications for all other listeners.- Parameters:
e- errorsourceEntry- performance tracking
-
isFailed
default boolean isFailed()- Returns:
- true if this table is in a failure state.
-
newModifiedColumnSet
Retrieve theModifiedColumnSetthat will be used when propagating updates from this table.- Parameters:
columnNames- the columns that should belong to the resulting set.- Returns:
- the resulting ModifiedColumnSet for the given columnNames
-
newModifiedColumnSetTransformer
default ModifiedColumnSet.Transformer newModifiedColumnSetTransformer(String[] columnNames, ModifiedColumnSet[] columnSets) Create aModifiedColumnSet.Transformerthat can be used to propagate dirty columns from this table to listeners of the table used to construct columnSets. It is an error ifcolumnNamesandcolumnSetsare not the same length. The transformer will markcolumnSets[i]as dirty if the column represented bycolumnNames[i]is dirty.- Parameters:
columnNames- the source columnscolumnSets- the destination columns in the convenient ModifiedColumnSet form- Returns:
- a transformer that knows the dirty details
-
newModifiedColumnSetTransformer
default ModifiedColumnSet.Transformer newModifiedColumnSetTransformer(DynamicTable resultTable, String... columnNames) Create aModifiedColumnSet.Transformerthat can be used to propagate dirty columns from this table to listeners of the provided resultTable.- Parameters:
resultTable- the destination tablecolumnNames- the columns that map one-to-one with the result table- Returns:
- a transformer that passes dirty details via an identity mapping
-
newModifiedColumnSetTransformer
default ModifiedColumnSet.Transformer newModifiedColumnSetTransformer(DynamicTable resultTable, MatchPair... matchPairs) Create aModifiedColumnSet.Transformerthat can be used to propagate dirty columns from this table to listeners of the provided resultTable.- Parameters:
resultTable- the destination tablematchPairs- the columns that map one-to-one with the result table- Returns:
- a transformer that passes dirty details via an identity mapping
-
newModifiedColumnSetIdentityTransformer
default ModifiedColumnSet.Transformer newModifiedColumnSetIdentityTransformer(Map<String, ColumnSource> newColumns) Create a transformer that uses an identity mapping from one ColumnSourceMap to another. The two CSMs must have equivalent column names and column ordering.- Parameters:
newColumns- the column source map for result table- Returns:
- a simple Transformer that makes a cheap, but CSM compatible copy
-
newModifiedColumnSetIdentityTransformer
Create a transformer that uses an identity mapping from one DynamicTable to another. The two tables must have equivalent column names and column ordering.- Parameters:
other- the result table- Returns:
- a simple Transformer that makes a cheap, but CSM compatible copy
-