Class SelectAndViewAnalyzer
java.lang.Object
com.illumon.iris.db.v2.select.analyzers.SelectAndViewAnalyzer
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
- Direct Known Subclasses:
BaseLayer,DependencyLayerBase,RedirectionLayer
public abstract class SelectAndViewAnalyzer
extends Object
implements com.fishlib.base.log.LogOutputAppendable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceAn interface for submitting jobs to be executed and accumulating their performance.static classstatic enumstatic classA class that handles the completion of one select column.static classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidapplyUpdate(ShiftAwareListener.Update upstream, ReadOnlyIndex toClear, SelectAndViewAnalyzer.UpdateHelper helper, SelectAndViewAnalyzer.JobScheduler jobScheduler, SelectAndViewAnalyzer.SelectLayerCompletionHandler onCompletion) Apply this update to this SelectAndViewAnalyzer.calcEffects(boolean forcePublishAllResources) Our job here is to calculate the effects: a map from incoming column to a list of columns that it effects.static SelectAndViewAnalyzerWrappercreate(SelectAndViewAnalyzer.Mode mode, Map<String, ColumnSource> columnSources, Index index, ModifiedColumnSet parentMcs, boolean publishTheseSources, boolean useShiftedCols, SelectColumn... selectColumns) futureCompletionHandler(CompletableFuture<Void> waitForResult) Create a completion handler that signals a future when the update is completed.final Map<String,ColumnSource> abstract SelectAndViewAnalyzergetInner()final Map<String,ColumnSource> final Map<String,ColumnSource> voidsetAllNewColumns(BitSet bitset) Set the bits in bitset that represent all of the new columns, this is used to identify when the select or update operaiton is completeabstract voidtoString()abstract voidupdateColumnDefinitionsFromTopLayer(Map<String, com.illumon.dataobjects.ColumnDefinition> columnDefinitions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.fishlib.base.log.LogOutputAppendable
append
-
Constructor Details
-
SelectAndViewAnalyzer
public SelectAndViewAnalyzer(int layerIndex)
-
-
Method Details
-
create
public static SelectAndViewAnalyzerWrapper create(SelectAndViewAnalyzer.Mode mode, Map<String, ColumnSource> columnSources, Index index, ModifiedColumnSet parentMcs, boolean publishTheseSources, boolean useShiftedCols, SelectColumn... selectColumns) -
setAllNewColumns
Set the bits in bitset that represent all of the new columns, this is used to identify when the select or update operaiton is complete- Parameters:
bitset- the bitset to manipulate.
-
getAllColumnSources
-
getNewColumnSources
-
getPublishedColumnSources
-
applyUpdate
public abstract void applyUpdate(ShiftAwareListener.Update upstream, ReadOnlyIndex toClear, SelectAndViewAnalyzer.UpdateHelper helper, SelectAndViewAnalyzer.JobScheduler jobScheduler, SelectAndViewAnalyzer.SelectLayerCompletionHandler onCompletion) Apply this update to this SelectAndViewAnalyzer.- Parameters:
upstream- the upstream updatetoClear- rows that used to exist and no longer existhelper- convenience class that memoizes reusable calculations for this updateonCompletion- called when an inner column is complete, the outer layer should pass the completion on to other layers and if it all of it's dependencies have been satisfied schedule execution of that column update
-
calcEffects
Our job here is to calculate the effects: a map from incoming column to a list of columns that it effects. We do this in two stages. In the first stage we create a map from column to (set of dependent columns). In the second stage we reverse that map. -
getInner
-
updateColumnDefinitionsFromTopLayer
-
startTrackingPrev
public abstract void startTrackingPrev() -
futureCompletionHandler
public SelectAndViewAnalyzer.SelectLayerCompletionHandler futureCompletionHandler(CompletableFuture<Void> waitForResult) Create a completion handler that signals a future when the update is completed.- Parameters:
waitForResult- a void future indicating success or failure- Returns:
- a completion handler that will signal the future
-
toString
-