|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.geronimo.kernel.basic.BasicDependencyManager
DependencyManager is the record keeper of the dependencies in Geronimo. The DependencyManager does not enforce any dependencies, it is simply a place where components can register their intent to be dependent on another component. Since a JMX Component can pretty much do whatever it wants a component must watch the components it depends on to assure that they are following the J2EE-Management state machine.
The DependencyManager uses the nomenclature of parent-child where a child is dependent on a parent. The names parent and child have no other meaning are just a convience to make the code readable.
| Nested Class Summary | |
private class |
BasicDependencyManager.DependencyManagerLifecycleListener
|
| Field Summary | |
private java.util.Map |
childToParentMap
A map from child names to a list of parents. |
private LifecycleListener |
lifecycleListener
Listenes for GBeans to unregister and removes all dependencies associated with the dependency |
private LifecycleMonitor |
lifecycleMonitor
The lifecycleMonitor informs us when gbeans go off line, so we can clean up the lingering dependencies. |
private java.util.Map |
parentToChildMap
A map from parent back to a list of its children. |
private java.util.Map |
startHoldsMap
A map from a component's ObjectName to the list of ObjectPatterns that the component is blocking from starting. |
| Constructor Summary | |
BasicDependencyManager(LifecycleMonitor lifecycleMonitor)
|
|
| Method Summary | |
void |
addDependencies(javax.management.ObjectName child,
java.util.Set parents)
Adds dependencies from the child to every parent in the parents set |
void |
addDependency(javax.management.ObjectName child,
javax.management.ObjectName parent)
Declares a dependency from a child to a parent. |
void |
addStartHolds(javax.management.ObjectName objectName,
java.util.Collection holds)
Adds a hold on a collection of object name patterns. |
javax.management.ObjectName |
checkBlocker(javax.management.ObjectName objectName)
Gets the object name of the mbean blocking the start specified mbean. |
void |
close()
Closes the dependency manager releasing all resources |
java.util.Set |
getChildren(javax.management.ObjectName parent)
Gets all of the MBeans that have a dependency on the specified startParent. |
java.util.Set |
getParents(javax.management.ObjectName child)
Gets the set of parents that the child is depending on |
void |
removeAllDependencies(javax.management.ObjectName child)
Removes all dependencies for a child |
void |
removeAllStartHolds(javax.management.ObjectName objectName)
Removes all of the holds owned by a component. |
void |
removeDependency(javax.management.ObjectName child,
javax.management.ObjectName parent)
Removes a dependency from a child to a parent |
void |
removeStartHolds(javax.management.ObjectName objectName,
java.util.Collection holds)
Removes a collection of holds. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private final LifecycleMonitor lifecycleMonitor
private final LifecycleListener lifecycleListener
private final java.util.Map childToParentMap
private final java.util.Map parentToChildMap
private final java.util.Map startHoldsMap
| Constructor Detail |
public BasicDependencyManager(LifecycleMonitor lifecycleMonitor)
throws java.lang.Exception
| Method Detail |
public void close()
DependencyManager
close in interface DependencyManager
public void addDependency(javax.management.ObjectName child,
javax.management.ObjectName parent)
addDependency in interface DependencyManagerchild - the dependent componentparent - the component the child is depending on
public void removeDependency(javax.management.ObjectName child,
javax.management.ObjectName parent)
removeDependency in interface DependencyManagerchild - the dependnet componentparent - the component that the child wil no longer depend onpublic void removeAllDependencies(javax.management.ObjectName child)
removeAllDependencies in interface DependencyManagerchild - the component that will no longer depend on anything
public void addDependencies(javax.management.ObjectName child,
java.util.Set parents)
addDependencies in interface DependencyManagerchild - the dependent componentparents - the set of components the child is depending onpublic java.util.Set getParents(javax.management.ObjectName child)
getParents in interface DependencyManagerchild - the dependent component
public java.util.Set getChildren(javax.management.ObjectName parent)
getChildren in interface DependencyManagerparent - the component the returned childen set depend on
public void addStartHolds(javax.management.ObjectName objectName,
java.util.Collection holds)
addStartHolds in interface DependencyManagerobjectName - the name of the component placing the holdsholds - a collection of object name patterns which should not start
public void removeStartHolds(javax.management.ObjectName objectName,
java.util.Collection holds)
removeStartHolds in interface DependencyManagerobjectName - the object name of the components owning the holdsholds - a collection of the holds to removepublic void removeAllStartHolds(javax.management.ObjectName objectName)
removeAllStartHolds in interface DependencyManagerobjectName - the object name of the component that will no longer have any holdspublic javax.management.ObjectName checkBlocker(javax.management.ObjectName objectName)
checkBlocker in interface DependencyManagerobjectName - the mbean to check for blockers
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||