|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.util.DependencyGraph
public class DependencyGraph
Model of dependency of lookup, in which one stream supplies values for lookup in another stream.
Constructor Summary | |
---|---|
DependencyGraph(int numStreams,
boolean allowDependencySame)
Ctor. |
Method Summary | |
---|---|
void |
addDependency(int target,
int from)
Adds a single dependency of target on a required streams. |
void |
addDependency(int target,
java.util.SortedSet<java.lang.Integer> requiredStreams)
Adds dependencies that a target may have on required streams. |
java.util.Map<java.lang.Integer,java.util.SortedSet<java.lang.Integer>> |
getDependencies()
Returns a map of stream number and the streams dependencies. |
java.util.Set<java.lang.Integer> |
getDependenciesForStream(int stream)
Returns the set of dependent streams for a given stream. |
java.util.Stack<java.lang.Integer> |
getFirstCircularDependency()
Returns any circular dependency as a stack of stream numbers, or null if none exist. |
int |
getNumStreams()
Returns the number of streams. |
java.util.Set<java.lang.Integer> |
getRootNodes()
Returns a set of stream numbers that are the root dependencies, i.e. |
java.util.Set<java.lang.Integer> |
getRootNodes(java.util.Set<java.lang.Integer> ignoreList)
Return the root nodes ignoring the nodes provided. |
boolean |
hasDependency(int stream)
Returns true if the stream asked for has a dependency. |
boolean |
hasUnsatisfiedDependency(int navigableStream,
java.util.Set<java.lang.Integer> ignoreList)
Check if the given stream has any dependencies, direct or indirect, to any of the streams that are not in the ignore list. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DependencyGraph(int numStreams, boolean allowDependencySame)
numStreams
- - number of streamsMethod Detail |
---|
public int getNumStreams()
public java.lang.String toString()
toString
in class java.lang.Object
public void addDependency(int target, java.util.SortedSet<java.lang.Integer> requiredStreams)
target
- the stream having dependencies on one or more other streamsrequiredStreams
- the streams that the target stream has a dependency onpublic void addDependency(int target, int from)
target
- the stream having dependencies on one or more other streamsfrom
- a single required streams that the target stream has a dependency onpublic boolean hasDependency(int stream)
stream
- to check dependency for
public java.util.Set<java.lang.Integer> getDependenciesForStream(int stream)
stream
- to return dependent streams for
public java.util.Map<java.lang.Integer,java.util.SortedSet<java.lang.Integer>> getDependencies()
public java.util.Set<java.lang.Integer> getRootNodes()
public java.util.Set<java.lang.Integer> getRootNodes(java.util.Set<java.lang.Integer> ignoreList)
ignoreList
- nodes to be ignored
public java.util.Stack<java.lang.Integer> getFirstCircularDependency()
public boolean hasUnsatisfiedDependency(int navigableStream, java.util.Set<java.lang.Integer> ignoreList)
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |