class FeatureDependencyGraph extends AnyRef
A dependency graph for feature anchors and feature derivations.
Purpose 1: Given a list of features' dependencies and which features are anchored, build a graph that can determine which features are reachable and can resolve features' transitive dependencies on demand. Purpose 2: Given a list of features with entity key bindings (a.k.a. key tags), provide fully expanded list of all transitive dependencies including entity key bindings. E.g. if feature2 depends on feature1, and the request was for [ (a1):feature2, (a2):feature2 ], then the expanded dependencies would be: [ (a1):feature2, (a2):feature2, (a1):feature1, (a2):feature1]
- Annotations
- @InternalApi()
- Alphabetic
- By Inheritance
- FeatureDependencyGraph
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FeatureDependencyGraph(dependencyFeatures: Map[String, Set[ErasedEntityTaggedFeature]], anchoredFeatures: Collection[String])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getComputationPipeline(requestedFeatures: Collection[TaggedFeatureName]): List[Set[TaggedFeatureName]]
Return a computation pipeline (a collection of stages that can be computed simultaneously) for the requested features by examining their dependencies and grouping them based on their depth.
Return a computation pipeline (a collection of stages that can be computed simultaneously) for the requested features by examining their dependencies and grouping them based on their depth. For each stage, all features will have their direct dependencies resolved from the previous stages so they can be computed simultaneously
For example, if the feature dependencies are as follows and features E and F are requested A -> C B -> D (C,D) -> E F
Then the result would be returned in the form of an ordered list: F],[C,D],[E which represents stage 1: A, B, F stage 2: C, D stage 3: E
Disclaimer: the pipeline based approach provides one way to optimize the feature execution and their dependencies but it is by no means the most optimal. For example, in the example above, if A is very slow compared to B and F, then computation of C will be blocked until A is ready. The optimal solution where each feature is computed in isolation all the way from its root dependency.
- returns
a sorted list of features represents the stages for feature execution
-
def
getOrderedPlanForFeatureUrns(request: Collection[TaggedFeatureName]): List[TaggedFeatureName]
Returns an ordered list of features including the requested features and its dependencies that represents their execution order.
Returns an ordered list of features including the requested features and its dependencies that represents their execution order.
For example, if the feature dependency is A->B, B->C and (A,C) -> D. Then one possible execution order would be: A, B, C, D
-
def
getPlan(features: Collection[String]): List[String]
Construct a plan for procuring a group of features.
Construct a plan for procuring a group of features.
For a given group of features, what are all the features (transitive dependencies) that need to be procured in order to derive them? This function returns a complete, ordered list of features sufficient to derive the given group of features when evaluated in-order.
- returns
Ordered list of feature names that can be resolved in-sequence to produce a superset of the given group of features. The returned list is NOT just a re-ordering of the input features, and may contain other features that weren't specifically requested but are required as dependencies. The returned list will always contain all of the features provided in the input.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isDeclared(feature: String): Boolean
Returns whether a given feature name is present in the dependency graph
Returns whether a given feature name is present in the dependency graph
- returns
whether a given feature name is present in the dependency graph
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isReachableWithErrorMessage(feature: String): Pair[Boolean, String]
Returns whether a given feature is reachable
Returns whether a given feature is reachable
- returns
A Pair of Boolean and String. Boolean indicates if it's reachable and the String indicates the error message if not reachable.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- FeatureDependencyGraph → AnyRef → Any
- Annotations
- @Override()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Deprecated Value Members
-
def
getOrderedPlanForRequest(request: Collection[TaggedFeatureName]): List[TaggedFeatureName]
Use
#getOrderedPlanForFeatureUrnsinstead.Use
#getOrderedPlanForFeatureUrnsinstead.- Annotations
- @Deprecated
- Deprecated
-
def
isReachable(feature: String): Boolean
Returns whether a given feature is reachable
Returns whether a given feature is reachable
- returns
isReachable Boolean
- Annotations
- @Deprecated
- Deprecated