X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fspi%2FModule.java;h=4766ad8a47d3ce2c9ffc1a6f81ea11bf3818905a;hb=a81d98f692b80c45bce3fe6a87e731abfb012a9f;hp=1b16ec828432624b120228c4cacfd91479a0406e;hpb=ca923718510fffbf66c2a0c6f41a3638d59495e9;p=controller.git diff --git a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/spi/Module.java b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/spi/Module.java index 1b16ec8284..4766ad8a47 100644 --- a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/spi/Module.java +++ b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/spi/Module.java @@ -7,11 +7,10 @@ */ package org.opendaylight.controller.config.spi; +import javax.annotation.concurrent.NotThreadSafe; import org.opendaylight.controller.config.api.ModuleIdentifier; import org.opendaylight.yangtools.concepts.Identifiable; -import javax.annotation.concurrent.NotThreadSafe; - /** * Represents one service that is to be configured. These methods need to be @@ -55,4 +54,17 @@ public interface Module extends Identifiable{ */ AutoCloseable getInstance(); + + /** + * Compare current module with oldModule and if the instance/live object + * produced by the old module can be reused in this module as well return true. + * Typically true should be returned if the old module had the same configuration. + * + * + * @param oldModule old instance of Module + * @return true if the instance produced by oldModule can be reused with current instance as well. + */ + boolean canReuse(Module oldModule); + + }