X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fdata%2FAsyncDataBroker.java;h=26935f2df8c07cbc4472a85a183768967d1970f3;hb=0f69f9e83ca8602d7ad7646ff4e146f802c534c1;hp=6da0af4986f952a29ddb2121e6a4082783780a16;hpb=2e4ffc89f2d46950dbfdd8259f817ae4c336e3ef;p=controller.git diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataBroker.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataBroker.java index 6da0af4986..26935f2df8 100644 --- a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataBroker.java +++ b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataBroker.java @@ -7,7 +7,6 @@ */ package org.opendaylight.controller.md.sal.common.api.data; -import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.concepts.Path; /** @@ -31,7 +30,7 @@ import org.opendaylight.yangtools.concepts.Path; * For a detailed explanation of how transaction are isolated and how transaction-local * changes are committed to global data tree, see * {@link AsyncReadTransaction}, {@link AsyncWriteTransaction}, - * {@link AsyncReadWriteTransaction} and {@link AsyncWriteTransaction#commit()}. + * {@link AsyncReadWriteTransaction} and {@link AsyncWriteTransaction#submit()}. * * *

@@ -52,110 +51,7 @@ import org.opendaylight.yangtools.concepts.Path; * @param * Type of data (payload), which represents data payload */ -public interface AsyncDataBroker

, D, L extends AsyncDataChangeListener> extends // - AsyncDataTransactionFactory { - - /** - * Scope of Data Change - * - *

- * Represents scope of data change (addition, replacement, deletion). - * The terminology for scope types is reused from LDAP. - * - *

Examples

- * - *

- * Following is an example model with comments describing what notifications - * you would receive based on the scope you specify, when you are - * registering for changes on container a. - * - *

-     * container a              // scope BASE, ONE, SUBTREE
-     *    leaf "foo"            // scope ONE, SUBTREE
-     *    container             // scope ONE, SUBTREE
-     *       leaf  "bar"        // scope SUBTREE
-     *    list list             // scope ONE, SUBTREE
-     *      list [a]            // scope SUBTREE
-     *        id "a"            // scope SUBTREE
-     *      list [b]            // scope SUBTREE
-     *        id "b"            // scope SUBTREE
-     * 
- * - *

- * Following is an example model with comments describing what notifications - * you would receive based on the scope you specify, when you are - * registering for changes on list list (without specifying concrete item in - * the list). - * - *

-     *  list list               // scope BASE, ONE, SUBTREE
-     *      list [a]            // scope ONE, SUBTREE
-     *        id "a"            // scope SUBTREE
-     *      list [b]            // scope ONE, SUBTREE
-     *        id "b"            // scope SUBTREE
-     * 
- * - * - * @see LDAP - */ - enum DataChangeScope { - - /** - * Represents only a direct change of the node, such as replacement of a node, addition or - * deletion. Note that, as described in {@link #ONE}, this may have counterintuitive - * interactions when viewed from a binding aware application, in particular when it - * pertains to lists. - * - */ - BASE, - /** - * Represent a change (addition,replacement,deletion) of the node or one of its direct - * children. - * - *

- * Note that this is done in the binding independent data tree and so the behavior - * might be counterintuitive when used with binding aware interfaces particularly - * when it comes to lists. The list itself is a node in the binding independent tree, - * which means that if you want to listen on new elements you must listen on the list itself - * with the scope of {@link #ONE}. - * - *

- * As an example, in the below YANG snippet, listening on node with scope - * {@link #ONE} would tell you if the node-connector list was created or deleted, - * but not when elements were added or removed from the list assuming the list itself - * already existed. - * - *

-         * container nodes {
-         *   list node {
-         *     key "id";
-         *     leaf id {
-         *       type string;
-         *     }
-         *     list node-connector {
-         *       leaf id {
-         *         type string;
-         *       }
-         *     }
-         *   }
-         * }
-         * 
- * - *

- * This scope is superset of {@link #BASE}. - * - */ - ONE, - /** - * Represents a change of the node or any of or any of its child nodes, - * direct and nested. - * - *

- * This scope is superset of {@link #ONE} and {@link #BASE}. - * - */ - SUBTREE - } +public interface AsyncDataBroker

, D> extends AsyncDataTransactionFactory { @Override AsyncReadOnlyTransaction newReadOnlyTransaction(); @@ -165,76 +61,4 @@ public interface AsyncDataBroker

, D, L extends AsyncDataChange @Override AsyncWriteTransaction newWriteOnlyTransaction(); - - /** - * Registers a {@link AsyncDataChangeListener} to receive - * notifications when data changes under a given path in the conceptual data - * tree. - * - *

- * You are able to register for notifications for any node or subtree - * which can be reached via the supplied path. - * - *

- * If path type P allows it, you may specify paths up to the leaf nodes - * then it is possible to listen on leaf nodes. - * - *

- * You are able to register for data change notifications for a subtree even - * if it does not exist. You will receive notification once that node is created. - * - *

- * If there is any preexisting data in data tree on path for which you are - * registering, you will receive initial data change event, which will - * contain all preexisting data, marked as created. - * - *

- * You are also able to specify the scope of the changes you want to be - * notified. - * - *

- * Supported scopes are: - *

- * See {@link DataChangeScope} for examples. - * - *

- * This method returns a {@link ListenerRegistration} object. To - * "unregister" your listener for changes call the "close" method on this - * returned object. - * - *

- * You MUST call close when you no longer need to receive notifications - * (such as during shutdown or for example if your bundle is shutting down). - * - * @param store - * Logical Data Store - Logical Datastore you want to listen for - * changes in. For example - * {@link LogicalDatastoreType#OPERATIONAL} or - * {@link LogicalDatastoreType#CONFIGURATION} - * @param path - * Path (subtree identifier) on which client listener will be - * invoked. - * @param listener - * Instance of listener which should be invoked on - * @param triggeringScope - * Scope of change which triggers callback. - * @return Listener registration object, which may be used to unregister - * your listener using {@link ListenerRegistration#close()} to stop - * delivery of change events. - */ - @Deprecated - default ListenerRegistration registerDataChangeListener(LogicalDatastoreType store, P path, L listener, - DataChangeScope triggeringScope) { - throw new UnsupportedOperationException("Data change listeners are no longer supported."); - } }