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=1b16ec828432624b120228c4cacfd91479a0406e;hb=4f27eb271720e9d7eaa2f720672a2e76de82c40e;hp=b11d5f8beb1620c4d0e86b25c3ee1180565c2536;hpb=9fb64948564e252018f9b1e13e7cea2c92f991aa;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 b11d5f8beb..1b16ec8284 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,11 @@ */ package org.opendaylight.controller.config.spi; +import org.opendaylight.controller.config.api.ModuleIdentifier; +import org.opendaylight.yangtools.concepts.Identifiable; + import javax.annotation.concurrent.NotThreadSafe; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.annotations.RequireInterface; -import org.opendaylight.protocol.concepts.NamedObject; /** * Represents one service that is to be configured. These methods need to be @@ -20,7 +20,7 @@ import org.opendaylight.protocol.concepts.NamedObject; * ConfigBeans. *

* In order to guide dependency resolution, the setter method should be - * annotated with {@link RequireInterface}. + * annotated with {@link org.opendaylight.controller.config.api.annotations.RequireInterface}. *

*

* Thread safety note: implementations of this interface are not required to be @@ -28,7 +28,7 @@ import org.opendaylight.protocol.concepts.NamedObject; *

*/ @NotThreadSafe -public interface Module extends NamedObject { +public interface Module extends Identifiable{ /** * This method will be called as first phase in two phase commit. Instance * can check attributes, but is not allowed to do any kind of work that @@ -43,10 +43,10 @@ public interface Module extends NamedObject { * Returns 'live' object that was configured using this object. It is * allowed to call this method only after all ConfigBeans were validated. In * this method new resources might be opened or old instance might be - * modified. Note that when obtaining dependent Module using - * {@link org.opendaylight.controller.config.api.DependencyResolver#validateDependency(Class, javax.management.ObjectName, String)} - * a proxy will be created that will disallow calling this method before - * second commit phase begins. + * modified. This method must be implemented so that it returns same + * result for a single transaction. Since Module is created per transaction + * this means that it must be safe to cache result of first call. + * * * @return closeable instance: After bundle update the factory might be able * to copy old configuration into new one without being able to cast