config-api: final parameters
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / DependencyResolver.java
index 40ff7e17030bc254026574cd34a7a1ca48970819..813e55426b203bc1a679f4daa1d221bff1a6650b 100644 (file)
@@ -26,7 +26,7 @@ import org.opendaylight.yangtools.yang.binding.BaseIdentity;
 public interface DependencyResolver extends Identifiable<ModuleIdentifier> {
 
     /**
-     * To be used during validation phase to validate serice interface of
+     * To be used during validation phase to validate service interface of
      * dependent module.
      *
      * @param expectedServiceInterface MBean/MXBean interface which will back the proxy object.
@@ -51,6 +51,7 @@ public interface DependencyResolver extends Identifiable<ModuleIdentifier> {
     <T> T resolveInstance(Class<T> expectedType, ObjectName objectName,
                           JmxAttribute jmxAttribute);
 
+
     /**
      * To be used during commit phase to resolve identity-ref config attributes.
      *
@@ -86,4 +87,12 @@ public interface DependencyResolver extends Identifiable<ModuleIdentifier> {
      */
     <T> T newMXBeanProxy(ObjectName objectName, Class<T> interfaceClass);
 
+    /**
+     * Check whether a dependency will be reused or (re)created. Useful when deciding if current module could be also reused.
+     *
+     * @param objectName ObjectName ID of a dependency
+     * @param jmxAttribute JMXAttribute ID of a dependency
+     * @return true if the dependency will be reused false otherwise
+     */
+    boolean canReuseDependency(ObjectName objectName, JmxAttribute jmxAttribute);
 }