Package org.nuxeo.runtime.deploy
Class DependencyTree<K,T>
- java.lang.Object
-
- org.nuxeo.runtime.deploy.DependencyTree<K,T>
-
- All Implemented Interfaces:
Iterable<DependencyTree.Entry<K,T>>
- Direct Known Subclasses:
ContributionManager
public class DependencyTree<K,T> extends Object implements Iterable<DependencyTree.Entry<K,T>>
- Author:
- Bogdan Stefanescu TODO this was copied from nuxeo.commons and fixed - should put it back with all modifs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DependencyTree.Entry<K,T>
-
Field Summary
Fields Modifier and Type Field Description static int
PHANTOM
static int
REGISTERED
static int
RESOLVED
-
Constructor Summary
Constructors Constructor Description DependencyTree()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
PHANTOM
public static final int PHANTOM
- See Also:
- Constant Field Values
-
REGISTERED
public static final int REGISTERED
- See Also:
- Constant Field Values
-
RESOLVED
public static final int RESOLVED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DependencyTree
public DependencyTree()
-
-
Method Detail
-
iterator
public Iterator<DependencyTree.Entry<K,T>> iterator()
-
add
public DependencyTree.Entry<K,T> add(K key, T object, Collection<K> requires)
-
unregister
public void unregister(DependencyTree.Entry<K,T> entry)
-
getEntry
public DependencyTree.Entry<K,T> getEntry(K key)
-
getResolved
public T getResolved(K key)
-
resolve
public void resolve(DependencyTree.Entry<K,T> entry)
-
unresolve
public void unresolve(DependencyTree.Entry<K,T> entry)
-
isRegistered
public boolean isRegistered(K key)
-
isResolved
public boolean isResolved(K key)
-
getEntries
public Collection<DependencyTree.Entry<K,T>> getEntries()
-
getRegisteredObjects
public List<T> getRegisteredObjects()
-
getPendingEntries
public List<DependencyTree.Entry<K,T>> getPendingEntries()
-
getPendingObjects
public List<T> getPendingObjects()
-
getMissingRequirements
public List<DependencyTree.Entry<K,T>> getMissingRequirements()
-
getResolvedEntries
public List<DependencyTree.Entry<K,T>> getResolvedEntries()
Entries are sorted so an entry never depends on entries on its right.
-
getResolvedObjects
public List<T> getResolvedObjects()
-
clear
public void clear()
-
updateDependencies
protected void updateDependencies(DependencyTree.Entry<K,T> entry, Collection<K> requires)
-
registered
protected void registered(DependencyTree.Entry<K,T> entry)
-
unregistered
protected void unregistered(DependencyTree.Entry<K,T> entry)
-
resolved
protected void resolved(DependencyTree.Entry<K,T> entry)
-
unresolved
protected void unresolved(DependencyTree.Entry<K,T> entry)
-
-