X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fapi%2FDependencyResolver.java;h=813e55426b203bc1a679f4daa1d221bff1a6650b;hb=dd4468c48a1a0e807f4dffba879c939006c99086;hp=40ff7e17030bc254026574cd34a7a1ca48970819;hpb=803d525860fbb1974b65ba5605ba5a9dfe1928a4;p=controller.git diff --git a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java index 40ff7e1703..813e55426b 100644 --- a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java +++ b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java @@ -26,7 +26,7 @@ import org.opendaylight.yangtools.yang.binding.BaseIdentity; public interface DependencyResolver extends Identifiable { /** - * 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 { T resolveInstance(Class 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 { */ T newMXBeanProxy(ObjectName objectName, Class 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); }