Interface StreamGraphOptimizationStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Defines an optimization strategy for StreamGraph. Implementors of this interface provide methods
to modify and optimize a StreamGraph based on contexts provided at runtime.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Method Summary
Modifier and TypeMethodDescriptiondefault voidinitialize(StreamGraphContext context) Initializes the StreamGraphOptimizationStrategy with the providedStreamGraphContext.booleanonOperatorsFinished(OperatorsFinished operatorsFinished, StreamGraphContext context) Tries to optimize the StreamGraph using the providedOperatorsFinishedandStreamGraphContext.
-
Field Details
-
STREAM_GRAPH_OPTIMIZATION_STRATEGY
-
-
Method Details
-
initialize
Initializes the StreamGraphOptimizationStrategy with the providedStreamGraphContext.- Parameters:
context- the StreamGraphContext with a read-only view of a StreamGraph, providing methods to modify StreamEdges and StreamNodes within the StreamGraph.
-
onOperatorsFinished
boolean onOperatorsFinished(OperatorsFinished operatorsFinished, StreamGraphContext context) throws Exception Tries to optimize the StreamGraph using the providedOperatorsFinishedandStreamGraphContext. The method returns a boolean indicating whether the StreamGraph was successfully optimized.- Parameters:
operatorsFinished- the OperatorsFinished object containing information about completed operators and their produced data size and distribution information.context- the StreamGraphContext with a read-only view of a StreamGraph, providing methods to modify StreamEdges and StreamNodes within the StreamGraph.- Returns:
trueif the StreamGraph was successfully optimized;falseotherwise.- Throws:
Exception
-