BUG-2283 Fix close order when reconfiguring config modules.
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / spi / Module.java
index b557108d4d00a39b988d7f82e5e4bb3bc41957b3..53f03a2398ef9cf8b854fd0bcc7e6959b8304ba5 100644 (file)
@@ -54,4 +54,17 @@ public interface Module extends Identifiable<ModuleIdentifier>{
      */
     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.
+     */
+    public boolean canReuse(Module oldModule);
+
+
 }