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
public interface DynamicTable extends Table, NotificationQueue.Dependency, DynamicNode, SystemicObject
-
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 Type Method Description void
awaitUpdate()
Wait for updates to this DynamicTable.boolean
awaitUpdate(long timeout)
Wait for updates to this DynamicTable.default boolean
isFailed()
void
listenForDirectUpdates(Listener listener)
Subscribe for updates to this table.default void
listenForUpdates(Listener listener)
Subscribe for updates to this table.void
listenForUpdates(Listener listener, boolean replayInitialImage)
Subscribe for updates to this table.void
listenForUpdates(ShiftAwareListener listener)
Subscribe for updates to this table.default ModifiedColumnSet
newModifiedColumnSet(String... columnNames)
Retrieve theModifiedColumnSet
that will be used when propagating updates from this table.default ModifiedColumnSet.Transformer
newModifiedColumnSetIdentityTransformer(DynamicTable other)
Create a transformer that uses an identity mapping from one DynamicTable to another.default ModifiedColumnSet.Transformer
newModifiedColumnSetIdentityTransformer(Map<String,ColumnSource> newColumns)
Create a transformer that uses an identity mapping from one ColumnSourceMap to another.default ModifiedColumnSet.Transformer
newModifiedColumnSetTransformer(DynamicTable resultTable, MatchPair... matchPairs)
Create aModifiedColumnSet.Transformer
that can be used to propagate dirty columns from this table to listeners of the provided resultTable.default ModifiedColumnSet.Transformer
newModifiedColumnSetTransformer(DynamicTable resultTable, String... columnNames)
Create aModifiedColumnSet.Transformer
that can be used to propagate dirty columns from this table to listeners of the provided resultTable.default ModifiedColumnSet.Transformer
newModifiedColumnSetTransformer(String[] columnNames, ModifiedColumnSet[] columnSets)
Create aModifiedColumnSet.Transformer
that can be used to propagate dirty columns from this table to listeners of the table used to construct columnSets.void
notifyListeners(ShiftAwareListener.Update update)
Initiate update delivery to this table's listeners.default void
notifyListeners(Index added, Index removed, Index modified)
Initiate update delivery to this table's listeners.void
notifyListenersOnError(Throwable e, UpdatePerformanceTracker.Entry sourceEntry)
Initiate failure delivery to this table's listeners.void
removeDirectUpdateListener(Listener listener)
Unsubscribe the supplied listener.void
removeUpdateListener(Listener listener)
Unsubscribe the supplied listener.void
removeUpdateListener(ShiftAwareListener listener)
Unsubscribe the supplied listener.Table
silent()
Return an identical table that suppresses all downstream notificationsMethods inherited from interface com.illumon.iris.db.v2.DynamicNode
addParentReference, isRefreshing, setRefreshing
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manage, tryManage
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
Methods inherited from interface com.illumon.iris.db.util.LongSizedDataStructure
intSize, intSize, size
Methods inherited from interface com.illumon.iris.db.tables.live.NotificationQueue.Dependency
satisfied
Methods inherited from interface com.illumon.iris.db.v2.SystemicObject
isSystemicObject, markSystemic
Methods 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
Table
that 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 ofnotifyListeners
takes ownership, and will callrelease
on it once it is not used anymore; callers should pass aclone
for 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 theModifiedColumnSet
that 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.Transformer
that can be used to propagate dirty columns from this table to listeners of the table used to construct columnSets. It is an error ifcolumnNames
andcolumnSets
are 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.Transformer
that 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.Transformer
that 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
-