X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fapi%2FDOMDataTreeService.java;h=e39d49f11763b537bafea69c4050587d7a983852;hp=21ff44c53958bd0e4b4153028f494b4e8c5540a4;hb=7c1be1d20084ee053747d517d597f1a07df694bd;hpb=b42eff1340aee9b4c29265de40296926d88b9525 diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeService.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeService.java index 21ff44c539..e39d49f117 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeService.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeService.java @@ -16,17 +16,22 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration; * with the data tree are split into data producers and consumers (listeners). Each * of them operate on a set of subtrees, which need to be declared at instantiation time. * + *

* Returned instances are not thread-safe and expected to be used by a single thread * at a time. Furthermore, producers may not be accessed from consumer callbacks * unless they were specified when the listener is registered. * + *

* The service maintains a loop-free topology of producers and consumers. What this means * is that a consumer is not allowed to access a producer, which affects any of the * subtrees it is subscribed to. This restriction is in place to ensure the system does * not go into a feedback loop, where it is impossible to block either a producer or * a consumer without accumulating excess work in the backlog stemming from its previous * activity. + * + * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMDataTreeService} instead. */ +@Deprecated public interface DOMDataTreeService extends DOMDataTreeProducerFactory, DOMService { /** * Register a {@link DOMDataTreeListener} instance. Once registered, the listener @@ -35,12 +40,14 @@ public interface DOMDataTreeService extends DOMDataTreeProducerFactory, DOMServi * is free to merge the changes, so that a smaller number of them will be reported, * possibly hiding some data transitions (like flaps). * + *

* If the listener wants to write into any producer, that producer has to be mentioned * in the call to this method. Those producers will be bound exclusively to the * registration, so that accessing them outside of this listener's callback will trigger * an error. Any producers mentioned must be idle, e.g. they may not have an open * transaction at the time this method is invoked. * + *

* Each listener instance can be registered at most once. Implementations of this * interface have to guarantee that the listener's methods will not be invoked * concurrently from multiple threads. @@ -58,5 +65,6 @@ public interface DOMDataTreeService extends DOMDataTreeProducerFactory, DOMServi * feedback loop */ @Nonnull ListenerRegistration registerListener(@Nonnull T listener, - @Nonnull Collection subtrees, boolean allowRxMerges, @Nonnull Collection producers); + @Nonnull Collection subtrees, boolean allowRxMerges, + @Nonnull Collection producers) throws DOMDataTreeLoopException; }