Cleaned up mdsal-common-api and mdsal-dom-spi
[mdsal.git] / common / mdsal-common-api / src / main / java / org / opendaylight / mdsal / common / api / AsyncReadTransaction.java
similarity index 52%
rename from common/mdsal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncReadTransaction.java
rename to common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/AsyncReadTransaction.java
index a70bc299366f4b36dc1480f26095804e013e99e8..bc5e882d93599fc01c50eba0945cf47e03a4da93 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.controller.md.sal.common.api.data;
+package org.opendaylight.mdsal.common.api;
 
 import org.opendaylight.yangtools.concepts.Path;
 
@@ -14,47 +14,44 @@ import org.opendaylight.yangtools.concepts.Path;
  * Marker interface for stateful read view of the data tree.
  *
  * <p>
- * View of the data tree is a stable point-in-time snapshot of the current data tree state when
- * the transaction was created. It's state and underlying data tree
- * is not affected by other concurrently running transactions.
+ * View of the data tree is a stable point-in-time snapshot of the current data tree state when the
+ * transaction was created. It's state and underlying data tree is not affected by other
+ * concurrently running transactions.
  *
  * <p>
- * <b>Implementation Note:</b> This interface is not intended to be implemented
- * by users of MD-SAL, but only to be consumed by them.
+ * <b>Implementation Note:</b> This interface is not intended to be implemented by users of MD-SAL,
+ * but only to be consumed by them.
  *
  * <h2>Transaction isolation example</h2>
  * Lets assume initial state of data tree for <code>PATH</code> is <code>A</code>.
  *
  * <pre>
- * txRead = broker.newReadOnlyTransaction();   // read Transaction is snapshot of data
+ * txRead = broker.newReadOnlyTransaction(); // read Transaction is snapshot of data
  * txWrite = broker.newReadWriteTransactoin(); // concurrent write transaction
- *
- * txRead.read(OPERATIONAL,PATH).get();        // will return Optional containing A
- * txWrite = broker.put(OPERATIONAL,PATH,B);   // writes B to PATH
- *
- * txRead.read(OPERATIONAL,PATH).get();        // still returns Optional containing A
- *
- * txWrite.commit().get();                     // data tree is updated, PATH contains B
- * txRead.read(OPERATIONAL,PATH).get();        // still returns Optional containing A
- *
+ * 
+ * txRead.read(OPERATIONAL, PATH).get(); // will return Optional containing A
+ * txWrite = broker.put(OPERATIONAL, PATH, B); // writes B to PATH
+ * 
+ * txRead.read(OPERATIONAL, PATH).get(); // still returns Optional containing A
+ * 
+ * txWrite.submit().get(); // data tree is updated, PATH contains B
+ * txRead.read(OPERATIONAL, PATH).get(); // still returns Optional containing A
+ * 
  * txAfterCommit = broker.newReadOnlyTransaction(); // read Transaction is snapshot of new state
- * txAfterCommit.read(OPERATIONAL,PATH).get(); // returns Optional containing B;
+ * txAfterCommit.read(OPERATIONAL, PATH).get(); // returns Optional containing B;
  * </pre>
  *
  * <p>
- * <b>Note:</b> example contains blocking calls on future only to illustrate
- * that action happened after other asynchronous action. Use of blocking call
- * {@link com.google.common.util.concurrent.ListenableFuture#get()} is discouraged for most
- * uses and you should use
+ * <b>Note:</b> example contains blocking calls on future only to illustrate that action happened
+ * after other asynchronous action. Use of blocking call
+ * {@link com.google.common.util.concurrent.ListenableFuture#get()} is discouraged for most uses and
+ * you should use
  * {@link com.google.common.util.concurrent.Futures#addCallback(com.google.common.util.concurrent.ListenableFuture, com.google.common.util.concurrent.FutureCallback)}
- * or other functions from {@link com.google.common.util.concurrent.Futures} to
- * register more specific listeners.
- *
- * @param <P>
- *            Type of path (subtree identifier), which represents location in
- *            tree
- * @param <D>
- *            Type of data (payload), which represents data payload
+ * or other functions from {@link com.google.common.util.concurrent.Futures} to register more
+ * specific listeners.
+ *
+ * @param <P> Type of path (subtree identifier), which represents location in tree
+ * @param <D> Type of data (payload), which represents data payload
  *
  */
 public interface AsyncReadTransaction<P extends Path<P>, D> extends AsyncTransaction<P, D> {