Fix checkstyle violations in sal-common-api 97/69097/3
authorTom Pantelis <tompantelis@gmail.com>
Mon, 5 Mar 2018 23:14:18 +0000 (18:14 -0500)
committerMichael Vorburger <vorburger@redhat.com>
Wed, 7 Mar 2018 11:51:17 +0000 (11:51 +0000)
Change-Id: I66ec5ec7c5066a5a95b7d40ca7e902d9f415f4ed
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
27 files changed:
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/clustering/Entity.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/clustering/EntityOwnershipService.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncConfigurationCommitCohort.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncConfigurationCommitCoordinator.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncConfigurationCommitHandler.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataBroker.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataChangeEvent.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataChangeListener.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataTransactionFactory.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncReadTransaction.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncReadWriteTransaction.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncTransaction.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataChange.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModification.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataReader.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataValidationFailedException.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/LogicalDatastoreType.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/OptimisticLockFailedException.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/ReadFailedException.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/TransactionChain.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/TransactionCommitDeadlockException.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/TransactionCommitFailedException.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/notify/NotificationPublishService.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/routing/RouteChange.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/routing/RouteChangeListener.java
opendaylight/md-sal/sal-common-api/src/test/java/org/opendaylight/controller/md/sal/common/api/clustering/EntityTest.java

index 2c79ff6803a54a17aaea7963b12670d26d5b676a..c97fe51d363dc39dc6d71365e410c1861a6a127f 100644 (file)
@@ -42,8 +42,8 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 public final class Entity implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    private static final QName ENTITY_QNAME =
-        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.general.entity.rev150820.Entity.QNAME;
+    private static final QName ENTITY_QNAME = org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
+            .controller.md.sal.core.general.entity.rev150820.Entity.QNAME;
     private static final QName ENTITY_NAME = QName.create(ENTITY_QNAME, "name");
 
     private final String type;
@@ -74,34 +74,32 @@ public final class Entity implements Serializable {
     }
 
     /**
-     *
-     * @return id of entity
+     * Returns the id of entity.
      */
     @Nonnull
-    public YangInstanceIdentifier getId(){
+    public YangInstanceIdentifier getId() {
         return id;
     }
 
     /**
-     *
-     * @return type of entity
+     * Returns the type of entity.
      */
     @Nonnull
-    public String getType(){
+    public String getType() {
         return type;
     }
 
     @Override
-    public boolean equals(Object o) {
-        if (this == o) {
+    public boolean equals(Object obj) {
+        if (this == obj) {
             return true;
         }
 
-        if (o == null || getClass() != o.getClass()) {
+        if (obj == null || getClass() != obj.getClass()) {
             return false;
         }
 
-        Entity entity = (Entity) o;
+        Entity entity = (Entity) obj;
 
         if (!id.equals(entity.id)) {
             return false;
index 07c93e780cdf0006f2e823891f5bd9126c226045..8e34d80f4720554ddc51bef653651d4045a9f2ed 100644 (file)
@@ -32,13 +32,14 @@ public interface EntityOwnershipService {
      * Registers a candidate for ownership of the given entity. Only one such request can be made per entity
      * per process. If multiple requests for registering a candidate for a given entity are received in the
      * current process a CandidateAlreadyRegisteredException will be thrown.
+     *
      * <p>
      * The registration is performed asynchronously and any registered {@link EntityOwnershipListener} is
      * notified of ownership status changes for the entity.
      *
      * @param entity the entity which the Candidate wants to own
      * @return a registration object that can be used to unregister the Candidate
-     * @throws org.opendaylight.controller.md.sal.common.api.clustering.CandidateAlreadyRegisteredException
+     * @throws CandidateAlreadyRegisteredException if the candidate is already registered
      */
     EntityOwnershipCandidateRegistration registerCandidate(@Nonnull Entity entity)
             throws CandidateAlreadyRegisteredException;
@@ -53,7 +54,8 @@ public interface EntityOwnershipService {
      * @param listener the listener that is interested in the entities
      * @return a registration object that can be used to unregister the Listener
      */
-    EntityOwnershipListenerRegistration registerListener(@Nonnull String entityType, @Nonnull EntityOwnershipListener listener);
+    EntityOwnershipListenerRegistration registerListener(@Nonnull String entityType,
+            @Nonnull EntityOwnershipListener listener);
 
     /**
      * Gets the current ownership state information for an entity.
@@ -64,9 +66,9 @@ public interface EntityOwnershipService {
     Optional<EntityOwnershipState> getOwnershipState(@Nonnull Entity forEntity);
 
     /**
-     * Check if a local candidate is registered for the given entity
+     * Check if a local candidate is registered for the given entity.
      *
-     * @param entity
+     * @param entity the entity
      * @return true if a candidate was registered locally, false otherwise
      */
     boolean isCandidateRegistered(@Nonnull Entity entity);
index 9fb350b7c06cc40ac64f38efbda9ac305680bb65..6f81e941c7e62add8df8f2a857f1fcc1de2f467b 100644 (file)
@@ -7,14 +7,11 @@
  */
 package org.opendaylight.controller.md.sal.common.api.data;
 
-import org.opendaylight.yangtools.concepts.Path;
-
 import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.yangtools.concepts.Path;
 
 /**
- *
- * Three phase Commit Cohort for subtree, which is
- * uniquely associated with user submitted transcation.
+ * Three phase Commit Cohort for subtree, which is uniquely associated with user submitted transaction.
  *
  * @param <P>
  *            Type of path (subtree identifier), which represents location in
@@ -27,6 +24,7 @@ public interface AsyncConfigurationCommitCohort<P extends Path<P>, D> {
     /**
      * Initiates a pre-commit of associated request
      *
+     * <p>
      * Implementation MUST NOT do any blocking calls during this callback, all
      * pre-commit preparation SHOULD happen asynchronously and MUST result in
      * completing returned future object.
@@ -40,9 +38,9 @@ public interface AsyncConfigurationCommitCohort<P extends Path<P>, D> {
     ListenableFuture<Void> preCommit(AsyncReadTransaction<P, D> rebasedTransaction);
 
     /**
-     *
      * Initiates a commit phase of associated request
      *
+     * <p>
      * Implementation MUST NOT do any blocking calls during this callback, all
      * commit finalization SHOULD happen asynchronously and MUST result in
      * completing returned future object.
@@ -53,9 +51,9 @@ public interface AsyncConfigurationCommitCohort<P extends Path<P>, D> {
     ListenableFuture<Void> commit();
 
     /**
-     *
      * Initiates abort phase of associated request
      *
+     * <p>
      * Implementation MUST NOT do any blocking calls during this callback, all
      * commit finalization SHOULD happen asynchronously and MUST result in
      * completing returned future object.
index 6d669ab9dfa481809214f8fe1b07cc9f4472e7a4..4cc608c56e2e82bc98b4f27621c41a7a0497341d 100644 (file)
@@ -12,7 +12,7 @@ import org.opendaylight.yangtools.concepts.Path;
 
 /**
  * Three Phase Commit Coordinator with support of user-supplied commit cohorts
- * which participates in three-phase commit protocols
+ * which participates in three-phase commit protocols.
  *
  * @param <P>
  *            Type of path (subtree identifier), which represents location in
@@ -23,7 +23,7 @@ import org.opendaylight.yangtools.concepts.Path;
 public interface AsyncConfigurationCommitCoordinator<P extends Path<P>, D> {
 
     /**
-     * Register configuration commit handler for particular subtree
+     * Register configuration commit handler for particular subtree.
      *
      * Configuration commit handler is invoked for all write transactions
      * which modifies <code>subtree</code>
index b966589afde579f48efc6d87efa14ed89ab1052c..4ad46801221f7c68f75d47a57a124b3104f284f1 100644 (file)
@@ -7,13 +7,13 @@
  */
 package org.opendaylight.controller.md.sal.common.api.data;
 
-import org.opendaylight.yangtools.concepts.Path;
-
 import com.google.common.util.concurrent.CheckedFuture;
+import org.opendaylight.yangtools.concepts.Path;
 
 /**
- * User-supplied participant in three-phase commit of transaction for configuration data tree
+ * User-supplied participant in three-phase commit of transaction for configuration data tree.
  *
+ * <p>
  * Client-supplied implementation of commit handler for subtree, which
  * is responsible for processing CAN-COMMIT phase of three-phase commit protocol
  * and return CommitCohort, which provides access to additional transitions
@@ -28,9 +28,9 @@ import com.google.common.util.concurrent.CheckedFuture;
 public interface AsyncConfigurationCommitHandler<P extends Path<P>, D> {
 
     /**
-     *
      * Requests a can commit phase
      *
+     * <p>
      * Implementations SHOULD NOT do any blocking operation during
      * processing this callback.
      *
@@ -44,7 +44,8 @@ public interface AsyncConfigurationCommitHandler<P extends Path<P>, D> {
      * <ul>
      * <li><b>is successful</b> - invocation of {@link CheckedFuture#checkedGet()} on returned future MUST
      *     return {@link AsyncConfigurationCommitCohort} associated with request.</li>
-     * <li><b>is unsuccessful</b> - invocation of {@link CheckedFuture#checkedGet()} must throw instance of {@link DataValidationFailedException}
+     * <li><b>is unsuccessful</b> - invocation of {@link CheckedFuture#checkedGet()} must throw instance
+     *     of {@link DataValidationFailedException}
      * with human readable explanaition of error condition.
      * </li>
      * </ul>
@@ -63,9 +64,9 @@ public interface AsyncConfigurationCommitHandler<P extends Path<P>, D> {
             ConfigurationCommitRequest<P, D> request);
 
     /**
-     *
      * Commit Request as was submitted by client code
      *
+     * <p>
      * Commit Request contains list view of created / updated / removed
      * path and read-only view of proposed client transaction,
      * which may be used to retrieve modified or referenced data.
@@ -80,30 +81,29 @@ public interface AsyncConfigurationCommitHandler<P extends Path<P>, D> {
     interface ConfigurationCommitRequest<P extends Path<P>, D> {
 
         /**
-         *
          * Read-only transaction which provides access only to configuration
          * data tree as if submitted transaction successfully happened and
          * no other concurrent modifications happened between allocation
          * of client transactions and write of client transactions.
          *
+         * <p>
          * Implementations of Commit Handlers are REQUIRED to use this
          * read-only view to access any data from configuration data tree,
          * in order to capture them as preconditions for this transaction.
          *
          * @return Read-only transaction which provides access only to configuration
-         * data tree as if submitted transaction successfully happened
+         *     data tree as if submitted transaction successfully happened
          */
         AsyncReadTransaction<P, D> getReadOnlyView();
 
         /**
-         *
          * Returns iteration of paths, to data which was introduced by this transaction.
          *
          * @return Iteration of paths, which was introduced by this transaction.
          */
         Iterable<P> getCreatedPaths();
+
         /**
-         *
          * Returns iteration of paths, to data which was updated by this transaction.
          *
          * @return Iteration of paths, which was updated by this transaction.
@@ -111,7 +111,6 @@ public interface AsyncConfigurationCommitHandler<P extends Path<P>, D> {
         Iterable<P> getUpdatedPaths();
 
         /**
-         *
          * Returns iteration of paths, to data which was removed by this transaction.
          *
          * @return Iteration of paths, which was removed by this transaction.
index 528324151710fdf8abd1c670c05f3de38744a04d..6da0af4986f952a29ddb2121e6a4082783780a16 100644 (file)
@@ -11,7 +11,6 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.Path;
 
 /**
- *
  * Base interface that provides access to a conceptual data tree store and also provides the ability to
  * subscribe for changes to data under a given branch of the tree.
  *
@@ -57,16 +56,15 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
         AsyncDataTransactionFactory<P, D> {
 
     /**
-     *
      * Scope of Data Change
      *
      * <p>
      * Represents scope of data change (addition, replacement, deletion).
-     *
      * The terminology for scope types is reused from LDAP.
      *
      * <h2>Examples</h2>
      *
+     * <p>
      * 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.
@@ -83,6 +81,7 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
      *        id "b"            // scope SUBTREE
      * </pre>
      *
+     * <p>
      * 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
@@ -112,12 +111,14 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
         /**
          * Represent a change (addition,replacement,deletion) of the node or one of its direct
          * children.
+         *
          * <p>
          * Note that this is done in the <i>binding independent</i> data tree and so the behavior
          * might be counterintuitive when used with <i>binding aware</i> interfaces particularly
          * when it comes to lists. The list itself is a node in the <i>binding independent</i> 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}.
+         *
          * <p>
          * As an example, in the below YANG snippet, listening on <tt>node</tt> with scope
          * {@link #ONE} would tell you if the <tt>node-connector</tt> list was created or deleted,
@@ -140,6 +141,7 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
          * }
          * </pre>
          *
+         * <p>
          * This scope is superset of {@link #BASE}.
          *
          */
@@ -148,27 +150,19 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
          * Represents a change of the node or any of or any of its child nodes,
          * direct and nested.
          *
+         * <p>
          * This scope is superset of {@link #ONE} and {@link #BASE}.
          *
          */
         SUBTREE
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     AsyncReadOnlyTransaction<P, D> newReadOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     AsyncReadWriteTransaction<P, D> newReadWriteTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     AsyncWriteTransaction<P, D> newWriteOnlyTransaction();
 
@@ -176,16 +170,19 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
      * Registers a {@link AsyncDataChangeListener} to receive
      * notifications when data changes under a given path in the conceptual data
      * tree.
+     *
      * <p>
      * You are able to register for notifications  for any node or subtree
      * which can be reached via the supplied path.
+     *
      * <p>
      * If path type <code>P</code> allows it, you may specify paths up to the leaf nodes
      * then it is possible to listen on leaf nodes.
+     *
      * <p>
      * 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 it does not exist. You will receive notification once that node is created.
+     *
      * <p>
      * 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
@@ -194,6 +191,7 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
      * <p>
      * You are also able to specify the scope of the changes you want to be
      * notified.
+     *
      * <p>
      * Supported scopes are:
      * <ul>
@@ -208,10 +206,12 @@ public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChange
      * or replaced.
      * </ul>
      * See {@link DataChangeScope} for examples.
+     *
      * <p>
      * This method returns a {@link ListenerRegistration} object. To
      * "unregister" your listener for changes call the "close" method on this
      * returned object.
+     *
      * <p>
      * 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).
index ac4a0ffc331226504b47b5f1cf45b996b0522b5c..8d5e347b173f146eeffc9896475bb0c4a5255f83 100644 (file)
@@ -9,26 +9,26 @@ package org.opendaylight.controller.md.sal.common.api.data;
 
 import java.util.Map;
 import java.util.Set;
-
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.concepts.Path;
 
 /**
- *
- * An event which contains a capture of changes in a data subtree
+ * An event which contains a capture of changes in a data subtree.
  *
  * <p>
  * Represents a notification indicating that some data at or under a particular
  * path has changed. The notification contains a capture of the changes in the data
  * subtree. This event is triggered by successful application of modifications
  * from a transaction on the global data tree. Use the
- * {@link AsyncDataBroker#registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener, AsyncDataBroker.DataChangeScope)}
+ * {@link AsyncDataBroker#registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener,
+ *     AsyncDataBroker.DataChangeScope)}
  * method to register a listener for data change events.
  *
  * <p>
  * A listener will only receive notifications for changes to data under the path
  * they register for. See
- * {@link AsyncDataBroker#registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener, AsyncDataBroker.DataChangeScope)}
+ * {@link AsyncDataBroker#registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener,
+ *     AsyncDataBroker.DataChangeScope)}
  * to learn more about registration scopes.
  *
  * <p>
@@ -50,7 +50,8 @@ public interface AsyncDataChangeEvent<P extends Path<P>, D> extends Immutable {
      * Returns a map of paths and newly created objects, which were introduced by
      * this change into conceptual data tree, if no new objects were introduced
      * this map will be empty.
-     *<p>
+     *
+     * <p>
      * This map contains all data tree nodes (and paths to them) which were created
      * and are in  the scope of listener registration. The data tree nodes
      * contain their whole subtree with their current state.
@@ -63,14 +64,17 @@ public interface AsyncDataChangeEvent<P extends Path<P>, D> extends Immutable {
      * Returns a map of paths and objects which were updated by this change in the
      * conceptual data tree if no existing objects were updated
      * this map will be empty.
-     *<p>
+     *
+     * <p>
      * This map contains all data tree nodes (and paths to them) which were updated
      * and are in the scope of listener registration. The data tree nodes
      * contain their whole subtree with their current state.
-     *<p>
+     *
+     * <p>
      * A Node is considered updated if it contents were replaced or one of its
      * children was created, removed or updated.
-     *<p>
+     *
+     * <p>
      * Original state of the updated data tree nodes is in
      * {@link #getOriginalData()} stored with same path.
      *
@@ -80,10 +84,12 @@ public interface AsyncDataChangeEvent<P extends Path<P>, D> extends Immutable {
 
     /**
      * Returns an immutable set of removed paths.
-     *<p>
+     *
+     * <p>
      * This set contains the paths to the data tree nodes which are in the scope
      * of the listener registration that have been removed.
-     *<p>
+     *
+     * <p>
      * Original state of the removed data tree nodes is in
      * {@link #getOriginalData()} stored with same path.
      *
@@ -110,7 +116,8 @@ public interface AsyncDataChangeEvent<P extends Path<P>, D> extends Immutable {
      *<p>
      * The view is rooted at the point where the listener, to which the event is
      * being delivered, was registered.
-     *<p>
+     *
+     * <p>
      * If listener used a wildcarded path (if supported by path type) during
      * registration for change listeners this method returns null, and original
      * state can be accessed only via {@link #getOriginalData()}
@@ -124,10 +131,12 @@ public interface AsyncDataChangeEvent<P extends Path<P>, D> extends Immutable {
     /**
      * Returns an immutable stable view of data, which captures the state of data
      * store after the reported change.
-     *<p>
+     *
+     * <p>
      * The view is rooted at the point where the listener, to which the event is
      * being delivered, was registered.
-     *<p>
+     *
+     * <p>
      * If listener used a wildcarded path (if supported by path type) during
      * registration for change listeners this method returns null, and state
      * can be accessed only via {@link #getCreatedData()},
index a7a9fef07fe4e91dae595e9831b31a051dfc62de..3b956d7f93b9ccd1854a2f18aa6debc9e6d489b9 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.controller.md.sal.common.api.data;
 
 import java.util.EventListener;
-
 import org.opendaylight.yangtools.concepts.Path;
 
 /**
@@ -16,7 +15,8 @@ import org.opendaylight.yangtools.concepts.Path;
  *
  * <p>
  * User-supplied implementations of this listener interface MUST register via
- * {@link AsyncDataBroker#registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener, AsyncDataBroker.DataChangeScope)}
+ * {@link AsyncDataBroker#registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener,
+ *     AsyncDataBroker.DataChangeScope)}
  * in order to start receiving data change events, which capture state changes
  * in a subtree.
  *
@@ -33,9 +33,9 @@ import org.opendaylight.yangtools.concepts.Path;
 @Deprecated
 public interface AsyncDataChangeListener<P extends Path<P>, D> extends EventListener {
     /**
-     *
      * Invoked when there is data change for the particular path, which was used to
      * register this listener.
+     *
      * <p>
      * This method may be also invoked during registration of the listener if
      * there is any preexisting data in the conceptual data tree for supplied path.
index a558b96b2d56fa26658741d8ee11ac63f3e735a3..22fa5ff9e489f23467ecd5a8f0991dcccb10b606 100644 (file)
@@ -48,7 +48,8 @@ import org.opendaylight.yangtools.concepts.Path;
  * implementations may optimize the transaction for reading if they know ahead
  * of time that you only need to read data - such as not keeping additional meta-data,
  * which may be required for write transactions.
- *<p>
+ *
+ * <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.
  *
@@ -64,9 +65,9 @@ import org.opendaylight.yangtools.concepts.Path;
 public interface AsyncDataTransactionFactory<P extends Path<P>, D> {
 
     /**
-     * Allocates a new read-only transaction which provides an immutable snapshot of
-     * the data tree.
-     *<p>
+     * Allocates a new read-only transaction which provides an immutable snapshot of the data tree.
+     *
+     * <p>
      * The view of data tree is an immutable snapshot of current data tree state when
      * transaction was allocated.
      *
@@ -107,6 +108,7 @@ public interface AsyncDataTransactionFactory<P extends Path<P>, D> {
      * used only by callers which are exclusive writers (exporters of data)
      * to the subtree they modify. This prevents optimistic
      * lock failures as described in {@link AsyncWriteTransaction#commit()}.
+     *
      * <p>
      * Exclusivity of writers to particular subtree SHOULD BE enforced by
      * external locking mechanism.
index 053d6346a420652e5ed369e0f43652ba21f8c988..ae342138938d00b5205c9c7315bb44c9f4374497 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.md.sal.common.api.data;
 import org.opendaylight.yangtools.concepts.Path;
 
 /**
- *
  * Marker interface for stateful read view of the data tree.
  *
  * <p>
@@ -46,7 +45,8 @@ import org.opendaylight.yangtools.concepts.Path;
  * 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)}
+ * {@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.
  *
index 16b4ed4fe2ed14d7cf7db8e5e88621df801d9f1c..1ebb5309e8116bc398212dc2a74b7db7fb59ca27 100644 (file)
@@ -40,6 +40,7 @@ import org.opendaylight.yangtools.concepts.Path;
  *
  * <h3>Transaction local state</h3>
  *
+ * <p>
  * Let assume initial state of data tree for <code>PATH</code> is <code>A</code>
  * .
  *
@@ -56,6 +57,7 @@ import org.opendaylight.yangtools.concepts.Path;
  * tx1afterCommit.read(OPERATIONAL,PATH).get(); // returns Optional containing B
  * </pre>
  *
+ * <p>
  * As you could see read-write transaction provides capabilities as
  * {@link AsyncWriteTransaction} but also allows for reading proposed changes as
  * if they already happened.
@@ -119,8 +121,8 @@ import org.opendaylight.yangtools.concepts.Path;
  * <b>Note:</b> examples 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)}
+ * 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.
  *
index 9855b2245c101e790c8696920052f71a0af0d20b..2fe3760c9d307ab115c0ed2a9be013a0ce50ee3c 100644 (file)
@@ -12,14 +12,15 @@ import org.opendaylight.yangtools.concepts.Path;
 
 
 /**
- *
  * A common parent for all transactions which operate on a conceptual data tree.
  *
+ * <p>
  * See derived transaction types for more concrete behavior:
  * <ul>
  * <li>{@link AsyncReadTransaction} - Read capabilities, user is able to read data from data tree</li>
  * <li>{@link AsyncWriteTransaction} - Write capabilities, user is able to propose changes to data tree</li>
- * <li>{@link AsyncReadWriteTransaction} - Read and Write capabilities, user is able to read state and to propose changes of state.</li>
+ * <li>{@link AsyncReadWriteTransaction} - Read and Write capabilities, user is able to read state and to propose
+ *     changes of state.</li>
  * </ul>
  *
  * <b>Implementation Note:</b> This interface is not intended to be implemented
@@ -33,6 +34,4 @@ public interface AsyncTransaction<P extends Path<P>,D> extends //
 
     @Override
     Object getIdentifier();
-
-
 }
index effeabefae89a69158d73028cc9467fb47f9a896..f12cb88a18860d3fed150d255687b73e115fde82 100644 (file)
@@ -7,13 +7,12 @@
  */
 package org.opendaylight.controller.md.sal.common.api.data;
 
+import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
-import com.google.common.util.concurrent.CheckedFuture;
-import com.google.common.util.concurrent.ListenableFuture;
-
 /**
  * Write transaction provides mutation capabilities for a data tree.
  *
@@ -21,11 +20,13 @@ import com.google.common.util.concurrent.ListenableFuture;
  * Initial state of write transaction is a stable snapshot of the current data tree.
  * The state is captured when the transaction is created and its state and underlying
  * data tree are not affected by other concurrently running transactions.
+ *
  * <p>
  * Write transactions are isolated from other concurrent write transactions. All
  * writes are local to the transaction and represent only a proposal of state
  * change for the data tree and it is not visible to any other concurrently running
  * transaction.
+ *
  * <p>
  * Applications make changes to the local data tree in the transaction by via the
  * <b>put</b>, <b>merge</b>, and <b>delete</b> operations.
@@ -34,6 +35,7 @@ import com.google.common.util.concurrent.ListenableFuture;
  * Stores a piece of data at a specified path. This acts as an add / replace
  * operation, which is to say that whole subtree will be replaced by the
  * specified data.
+ *
  * <p>
  * Performing the following put operations:
  *
@@ -42,6 +44,7 @@ import com.google.common.util.concurrent.ListenableFuture;
  * 2) container { list [ b ] }
  * </pre>
  *
+ * <p>
  * will result in the following data being present:
  *
  * <pre>
@@ -51,6 +54,7 @@ import com.google.common.util.concurrent.ListenableFuture;
  * Merges a piece of data with the existing data at a specified path. Any pre-existing data
  * which is not explicitly overwritten will be preserved. This means that if you store a container,
  * its child lists will be merged.
+ *
  * <p>
  * Performing the following merge operations:
  *
@@ -59,25 +63,30 @@ import com.google.common.util.concurrent.ListenableFuture;
  * 2) container { list [ b ] }
  * </pre>
  *
+ * <p>
  * will result in the following data being present:
  *
  * <pre>
  * container { list [ a, b ] }
  * </pre>
  *
+ * <p>
  * This also means that storing the container will preserve any
  * augmentations which have been attached to it.
  *
  * <h2>Delete operation</h2>
  * Removes a piece of data from a specified path.
+ *
  * <p>
  * After applying changes to the local data tree, applications publish the changes proposed in the
  * transaction by calling {@link #submit} on the transaction. This seals the transaction
  * (preventing any further writes using this transaction) and submits it to be
  * processed and applied to global conceptual data tree.
+ *
  * <p>
  * The transaction commit may fail due to a concurrent transaction modifying and committing data in
  * an incompatible way. See {@link #submit} for more concrete commit failure examples.
+ *
  * <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.
@@ -92,19 +101,21 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
     /**
      * Cancels the transaction.
      *
+     * <p>
      * Transactions can only be cancelled if it's status is
      * {@link TransactionStatus#NEW} or {@link TransactionStatus#SUBMITED}
      *
+     * <p>
      * Invoking cancel() on {@link TransactionStatus#FAILED} or
      * {@link TransactionStatus#CANCELED} will have no effect, and transaction
      * is considered cancelled.
      *
+     * <p>
      * Invoking cancel() on finished transaction  (future returned by {@link #submit()}
      * already completed with {@link TransactionStatus#COMMITED}) will always
      * fail (return false).
      *
-     * @return <tt>false</tt> if the task could not be cancelled,
-     * typically because it has already completed normally;
+     * @return <tt>false</tt> if the task could not be cancelled, typically because it has already completed normally
      * <tt>true</tt> otherwise
      *
      */
@@ -126,23 +137,26 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
     /**
      * Submits this transaction to be asynchronously applied to update the logical data tree.
      * The returned CheckedFuture conveys the result of applying the data changes.
+     *
      * <p>
      * <b>Note:</b> It is strongly recommended to process the CheckedFuture result in an asynchronous
      * manner rather than using the blocking get() method. See example usage below.
+     *
      * <p>
      * This call logically seals the transaction, which prevents the client from
      * further changing data tree using this transaction. Any subsequent calls to
      * {@link #delete(LogicalDatastoreType, Path)} will fail with
      * {@link IllegalStateException}.
      *
+     * <p>
      * The transaction is marked as {@link TransactionStatus#SUBMITED} and
      * enqueued into the data store back-end for processing.
      *
      * <p>
      * Whether or not the commit is successful is determined by versioning
      * of the data tree and validation of registered commit participants
-     * ({@link AsyncConfigurationCommitHandler})
-     * if the transaction changes the data tree.
+     * ({@link AsyncConfigurationCommitHandler}) if the transaction changes the data tree.
+     *
      * <p>
      * The effects of a successful commit of data depends on data change listeners
      * ({@link AsyncDataChangeListener}) and commit participants
@@ -179,6 +193,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * doWrite( 2 );
      * </pre>
      * <h2>Failure scenarios</h2>
+     *
      * <p>
      * Transaction may fail because of multiple reasons, such as
      * <ul>
@@ -201,6 +216,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      *
      * <h3>Change compatibility</h3>
      *
+     * <p>
      * There are several sets of changes which could be considered incompatible
      * between two transactions which are derived from same initial state.
      * Rules for conflict detection applies recursively for each subtree
@@ -208,6 +224,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      *
      * <h4>Change compatibility of leafs, leaf-list items</h4>
      *
+     * <p>
      * Following table shows  state changes and failures between two concurrent transactions,
      * which are based on same initial state, Tx 1 completes successfully
      * before Tx 2 is submitted.
@@ -232,6 +249,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      *
      * <h4>Change compatibility of subtrees</h4>
      *
+     * <p>
      * Following table shows  state changes and failures between two concurrent transactions,
      * which are based on same initial state, Tx 1 completes successfully
      * before Tx 2 is submitted.
@@ -242,17 +260,22 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * <tr><td>Empty</td><td>put(TOP,[])</td><td>put(TOP,[])</td><td>Tx 2 will fail, state is TOP=[]</td></tr>
      * <tr><td>Empty</td><td>put(TOP,[])</td><td>merge(TOP,[])</td><td>TOP=[]</td></tr>
      *
-     * <tr><td>Empty</td><td>put(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]</td></tr>
+     * <tr><td>Empty</td><td>put(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]
+     * </td></tr>
      * <tr><td>Empty</td><td>put(TOP,[FOO=1])</td><td>merge(TOP,[BAR=1])</td><td>TOP=[FOO=1,BAR=1]</td></tr>
      *
-     * <tr><td>Empty</td><td>merge(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]</td></tr>
+     * <tr><td>Empty</td><td>merge(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]
+     * </td></tr>
      * <tr><td>Empty</td><td>merge(TOP,[FOO=1])</td><td>merge(TOP,[BAR=1])</td><td>TOP=[FOO=1,BAR=1]</td></tr>
      *
-     * <tr><td>TOP=[]</td><td>put(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]</td></tr>
+     * <tr><td>TOP=[]</td><td>put(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]
+     * </td></tr>
      * <tr><td>TOP=[]</td><td>put(TOP,[FOO=1])</td><td>merge(TOP,[BAR=1])</td><td>state is TOP=[FOO=1,BAR=1]</td></tr>
-     * <tr><td>TOP=[]</td><td>merge(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]</td></tr>
+     * <tr><td>TOP=[]</td><td>merge(TOP,[FOO=1])</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is TOP=[FOO=1]
+     * </td></tr>
      * <tr><td>TOP=[]</td><td>merge(TOP,[FOO=1])</td><td>merge(TOP,[BAR=1])</td><td>state is TOP=[FOO=1,BAR=1]</td></tr>
-     * <tr><td>TOP=[]</td><td>delete(TOP)</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is empty store</td></tr>
+     * <tr><td>TOP=[]</td><td>delete(TOP)</td><td>put(TOP,[BAR=1])</td><td>Tx 2 will fail, state is empty store
+     * </td></tr>
      * <tr><td>TOP=[]</td><td>delete(TOP)</td><td>merge(TOP,[BAR=1])</td><td>state is TOP=[BAR=1]</td></tr>
      *
      * <tr><td>TOP=[]</td><td>put(TOP/FOO,1)</td><td>put(TOP/BAR,1])</td><td>state is TOP=[FOO=1,BAR=1]</td></tr>
@@ -260,12 +283,14 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * <tr><td>TOP=[]</td><td>merge(TOP/FOO,1)</td><td>put(TOP/BAR,1)</td><td>state is TOP=[FOO=1,BAR=1]</td></tr>
      * <tr><td>TOP=[]</td><td>merge(TOP/FOO,1)</td><td>merge(TOP/BAR,1)</td><td>state is TOP=[FOO=1,BAR=1]</td></tr>
      * <tr><td>TOP=[]</td><td>delete(TOP)</td><td>put(TOP/BAR,1)</td><td>Tx 2 will fail, state is empty store</td></tr>
-     * <tr><td>TOP=[]</td><td>delete(TOP)</td><td>merge(TOP/BAR,1]</td><td>Tx 2 will fail, state is empty store</td></tr>
+     * <tr><td>TOP=[]</td><td>delete(TOP)</td><td>merge(TOP/BAR,1]</td><td>Tx 2 will fail, state is empty store
+     * </td></tr>
      *
      * <tr><td>TOP=[FOO=1]</td><td>put(TOP/FOO,2)</td><td>put(TOP/BAR,1)</td><td>state is TOP=[FOO=2,BAR=1]</td></tr>
      * <tr><td>TOP=[FOO=1]</td><td>put(TOP/FOO,2)</td><td>merge(TOP/BAR,1)</td><td>state is TOP=[FOO=2,BAR=1]</td></tr>
      * <tr><td>TOP=[FOO=1]</td><td>merge(TOP/FOO,2)</td><td>put(TOP/BAR,1)</td><td>state is TOP=[FOO=2,BAR=1]</td></tr>
-     * <tr><td>TOP=[FOO=1]</td><td>merge(TOP/FOO,2)</td><td>merge(TOP/BAR,1)</td><td>state is TOP=[FOO=2,BAR=1]</td></tr>
+     * <tr><td>TOP=[FOO=1]</td><td>merge(TOP/FOO,2)</td><td>merge(TOP/BAR,1)</td><td>state is TOP=[FOO=2,BAR=1]
+     * </td></tr>
      * <tr><td>TOP=[FOO=1]</td><td>delete(TOP/FOO)</td><td>put(TOP/BAR,1)</td><td>state is TOP=[BAR=1]</td></tr>
      * <tr><td>TOP=[FOO=1]</td><td>delete(TOP/FOO)</td><td>merge(TOP/BAR,1]</td><td>state is TOP=[BAR=1]</td></tr>
      * </table>
@@ -275,6 +300,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      *
      * <h4>Conflict of two transactions</h4>
      *
+     * <p>
      * This example illustrates two concurrent transactions, which derived from
      * same initial state of data tree and proposes conflicting modifications.
      *
@@ -289,11 +315,13 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * ListenebleFuture futureB = txB.submit(); // transaction B is sealed and submitted
      * </pre>
      *
+     * <p>
      * Commit of transaction A will be processed asynchronously and data tree
      * will be updated to contain value <code>A</code> for <code>PATH</code>.
      * Returned {@link ListenableFuture} will successfully complete once
      * state is applied to data tree.
      *
+     * <p>
      * Commit of Transaction B will fail, because previous transaction also
      * modified path in a concurrent way. The state introduced by transaction B
      * will not be applied. Returned {@link ListenableFuture} object will fail
@@ -312,6 +340,8 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
     CheckedFuture<Void,TransactionCommitFailedException> submit();
 
     /**
+     * Deprecated.
+     *
      * @deprecated Use {@link #submit()} instead.
      */
     @Deprecated
index ebffbcc811747307f2a3a67a7b83cb403d5757c2..3cc1f17d862065d3d8dfd2588471815e8e93bfec 100644 (file)
@@ -9,20 +9,19 @@ package org.opendaylight.controller.md.sal.common.api.data;
 
 import java.util.Map;
 import java.util.Set;
-
 import org.opendaylight.yangtools.concepts.Path;
 
 public interface DataChange<P extends Path<P>, D> {
 
     /**
-     * Returns a map of paths and newly created objects
+     * Returns a map of paths and newly created objects.
      *
      * @return map of paths and newly created objects
      */
     Map<P, D> getCreatedOperationalData();
 
     /**
-     * Returns a map of paths and newly created objects
+     * Returns a map of paths and newly created objects.
      *
      * @return map of paths and newly created objects
      */
@@ -31,6 +30,7 @@ public interface DataChange<P extends Path<P>, D> {
     /**
      * Returns a map of paths and respective updated objects after update.
      *
+     * <p>
      * Original state of the object is in
      * {@link #getOriginalOperationalData()}
      *
@@ -41,6 +41,7 @@ public interface DataChange<P extends Path<P>, D> {
     /**
      * Returns a map of paths and respective updated objects after update.
      *
+     * <p>
      * Original state of the object is in
      * {@link #getOriginalConfigurationData()}
      *
@@ -53,6 +54,7 @@ public interface DataChange<P extends Path<P>, D> {
     /**
      * Returns a set of paths of removed objects.
      *
+     * <p>
      * Original state of the object is in
      * {@link #getOriginalConfigurationData()}
      *
@@ -63,6 +65,7 @@ public interface DataChange<P extends Path<P>, D> {
     /**
      * Returns a set of paths of removed objects.
      *
+     * <p>
      * Original state of the object is in
      * {@link #getOriginalOperationalData()}
      *
index 5356c56d8a9c1e48236a20a4553e269bbe19ec52..8803efa49b6b25263d17d08e8ae085a3584ff674 100644 (file)
@@ -11,14 +11,16 @@ import java.util.concurrent.Future;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.common.RpcResult;
+
 /**
+ * Deprecated.
  *
  * @deprecated Replaced by {@link AsyncWriteTransaction}
  */
 @Deprecated
 public interface DataModification<P extends Path<P>, D> extends DataChange<P, D>, DataReader<P, D> {
     /**
-     * Returns transaction identifier
+     * Returns transaction identifier.
      *
      * @return Transaction identifier
      */
@@ -32,16 +34,21 @@ public interface DataModification<P extends Path<P>, D> extends DataChange<P, D>
      * overwritten will be preserved. This means that if you store a container,
      * its child lists will be merged. Performing the following put operations:
      *
+     * <p>
      * 1) container { list [ a ] }
      * 2) container { list [ b ] }
      *
+     * <p>
      * will result in the following data being present:
      *
+     * <p>
      * container { list [ a, b ] }
      *
+     * <p>
      * This also means that storing the container will preserve any augmentations
      * which have been attached to it.
      *
+     * <p>
      * If you require an explicit replace operation, perform
      * {@link removeOperationalData} first.
      */
@@ -53,16 +60,21 @@ public interface DataModification<P extends Path<P>, D> extends DataChange<P, D>
      * overwritten will be preserved. This means that if you store a container,
      * its child lists will be merged. Performing the following put operations:
      *
+     * <p>
      * 1) container { list [ a ] }
      * 2) container { list [ b ] }
      *
+     * <p>
      * will result in the following data being present:
      *
+     * <p>
      * container { list [ a, b ] }
      *
+     * <p>
      * This also means that storing the container will preserve any augmentations
      * which have been attached to it.
      *
+     * <p>
      * If you require an explicit replace operation, perform
      * {@link removeConfigurationData} first.
      */
index 2f657b8e5049dc196fbb5a04d3ddcc5f0a5a244a..18ae7d348b74a9470e767c4d55acede2dbdef6e0 100644 (file)
@@ -12,6 +12,7 @@ import org.opendaylight.yangtools.concepts.Path;
 /**
  * Reader for reading YANG subtrees based on their path.
  *
+ * <p>
  * Reader is requested to return object at specified path and all it's subnodes
  * known to the reader or null if node is not found in this reader.
  *
@@ -20,13 +21,13 @@ import org.opendaylight.yangtools.concepts.Path;
  * @deprecated Replaced by org.opendaylight.controller.sal.core.spi.data.DOMStore contract.
  */
 @Deprecated
-public interface DataReader<P extends Path<P> ,D> {
+public interface DataReader<P extends Path<P>D> {
 
     /**
-     * Reads data from Operational data store located at provided path
+     * Reads data from Operational data store located at provided path.
      *
      * @param path Path to data
-     * @return
+     * @return the data
      */
     D readOperationalData(P path);
 
index d48bfc79fe8941935bbfa2b762d254d93f1da2d0..9d2b88702eba612dcfc55c01d8f6d9d54e3af49f 100644 (file)
@@ -7,31 +7,30 @@
  */
 package org.opendaylight.controller.md.sal.common.api.data;
 
+import com.google.common.base.Preconditions;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
-import com.google.common.base.Preconditions;
-
 /**
- *
  * Failure of asynchronous transaction commit caused by invalid data.
  *
+ * <p>
  * This exception is raised and returned when transaction commit
- * failed, because other data submitted via transactions
+ * failed, because other data submitted via transactions.
  *
+ * <p>
  *  Clients usually are not able recover from this error condition by
  *  retrieving same transaction, since data introduced by this transaction
  *  are invalid.
- *
  */
 public class DataValidationFailedException extends TransactionCommitFailedException {
 
     private static final long serialVersionUID = 1L;
 
-    private Path<?> path;
+    private final Path<?> path;
 
-    private Class<? extends Path<?>> pathType;
+    private final Class<? extends Path<?>> pathType;
 
     public <P extends Path<P>> DataValidationFailedException(final Class<P> pathType,final P path,
                                                              final String message, final Throwable cause) {
@@ -53,5 +52,4 @@ public class DataValidationFailedException extends TransactionCommitFailedExcept
     public final Class<? extends Path<?>> getPathType() {
         return pathType;
     }
-
 }
index d2e41f1688b78df1922724a02dbf662a262013dc..2951610e414ab2231a277ff29b12566334c94e41 100644 (file)
@@ -13,6 +13,7 @@ public enum LogicalDatastoreType {
      * Logical atastore representing operational state of the system
      * and it's components
      *
+     * <p>
      * This datastore is used to describe operational state of
      * the system and it's operation related data.
      *
@@ -22,10 +23,10 @@ public enum LogicalDatastoreType {
      * Logical Datastore representing configuration state of the system
      * and it's components.
      *
+     * <p>
      * This datastore is used to describe intended state of
      * the system and intended operation mode.
      *
      */
     CONFIGURATION
-
 }
index 637721c9a457a9d072bb4d63a546cf860eed2cc2..6c7c54fb7f9094e6c10e138c43dc104912e9bfd0 100644 (file)
@@ -8,18 +8,19 @@
 
 package org.opendaylight.controller.md.sal.common.api.data;
 
-import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 /**
-*
 * Failure of asynchronous transaction commit caused by failure
 * of optimistic locking.
 *
+* <p>
 * This exception is raised and returned when transaction commit
 * failed, because other transaction finished successfully
 * and modified same data as failed transaction.
 *
+* <p>
 *  Clients may recover from this error condition by
 *  retrieving current state and submitting new updated
 *  transaction.
@@ -37,5 +38,4 @@ public class OptimisticLockFailedException extends TransactionCommitFailedExcept
     public OptimisticLockFailedException(final String message) {
         this(message, null);
     }
-
 }
index b0a7807b76b2c0d1f055e0ea6e54b71fd4952a33..8d6b999d763815a2d8a473ea8f5f4df55df149a5 100644 (file)
@@ -20,11 +20,11 @@ public class ReadFailedException extends OperationFailedException {
     private static final long serialVersionUID = 1L;
 
     public static final ExceptionMapper<ReadFailedException> MAPPER =
-            new ExceptionMapper<ReadFailedException>("read", ReadFailedException.class) {
-                @Override
-                protected ReadFailedException newWithCause(String message, Throwable cause) {
-                    return new ReadFailedException(message, cause);
-                }
+        new ExceptionMapper<ReadFailedException>("read", ReadFailedException.class) {
+            @Override
+            protected ReadFailedException newWithCause(String message, Throwable cause) {
+                return new ReadFailedException(message, cause);
+            }
     };
 
     public ReadFailedException(String message, RpcError... errors) {
index 12d9da696eaf108f0e06d733e252ef36044fd95d..c46910402d4d3092b9b053e421b922175186363a 100644 (file)
@@ -15,25 +15,30 @@ import org.opendaylight.yangtools.concepts.Path;
  * as they occurred. A chain makes no guarantees of atomicity across the chained transactions -
  * the transactions are committed as soon as possible in the order that they were submitted.
  *
+ * <p>
  * This behaviour is different from the default AsyncDataBroker, where a
  * transaction is always created from the current global state, not taking into
  * account any transactions previously committed by the calling thread. Due to
  * the asynchronous nature of transaction submission this can lead to surprising
  * results. If a thread executes the following sequence sufficiently quickly:
  *
+ * <p>
  * AsyncWriteTransaction t1 = broker.newWriteOnlyTransaction();
  * t1.put(id, data);
  * t1.submit();
  *
+ * <p>
  * AsyncReadTransaction t2 = broker.newReadOnlyTransaction();
  * Optional&lt;?&gt; maybeData = t2.read(id).get();
  *
+ * <p>
  * it may happen, that it sees maybeData.isPresent() == false, simply because
  * t1 has not completed the processes of being applied and t2 is actually
  * allocated from the previous state. This is obviously bad for users who create
  * incremental state in the datastore and actually read what they write in
  * subsequent transactions.
  *
+ * <p>
  * Using a TransactionChain instead of a broker solves this particular problem,
  * and leads to expected behavior: t2 will always see the data written in t1
  * present.
@@ -48,6 +53,7 @@ public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable,
      * The previous write transaction has to be either SUBMITTED
      * ({@link AsyncWriteTransaction#submit submit} was invoked) or CANCELLED
      * ({@link #close close} was invoked).
+     *
      * <p>
      * The returned read-only transaction presents an isolated view of the data if the previous
      * write transaction was successful - in other words, this read-only transaction will see the
@@ -71,12 +77,14 @@ public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable,
      * The previous write transaction has to be either SUBMITTED
      * ({@link AsyncWriteTransaction#submit submit} was invoked) or CANCELLED
      * ({@link #close close} was invoked).
+     *
      * <p>
      * The returned read-write transaction presents an isolated view of the data if the previous
      * write transaction was successful - in other words, this read-write transaction will see the
      * state changes made by the previous write transaction in the chain. However, state which
      * was introduced by other transactions outside this transaction chain after creation of
      * the previous transaction is not visible.
+     *
      * <p>
      * Committing this read-write transaction using {@link AsyncWriteTransaction#submit submit}
      * will submit the state changes in this transaction to be visible to any subsequent
@@ -98,12 +106,14 @@ public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable,
      * The previous write transaction has to be either SUBMITTED
      * ({@link AsyncWriteTransaction#submit submit} was invoked) or CANCELLED
      * ({@link #close close} was invoked).
+     *
      * <p>
      * The returned write-only transaction presents an isolated view of the data if the previous
      * write transaction was successful - in other words, this write-only transaction will see the
      * state changes made by the previous write transaction in the chain. However, state which
      * was introduced by other transactions outside this transaction chain after creation of
      * the previous transaction is not visible.
+     *
      * <p>
      * Committing this write-only transaction using {@link AsyncWriteTransaction#submit submit}
      * will submit the state changes in this transaction to be visible to any subsequent
index 99a92e58e6f525a6cb0680e3d683c392facc39ee..8d9d1c2e882bb8333fa297deeea89643ce9cc1a9 100644 (file)
@@ -25,13 +25,14 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 public class TransactionCommitDeadlockException extends TransactionCommitFailedException {
     private static final long serialVersionUID = 1L;
     private static final String DEADLOCK_MESSAGE =
-            "An attempt to block on a ListenableFuture via a get method from a write " +
-            "transaction submit was detected that would result in deadlock. The commit " +
-            "result must be obtained asynchronously, e.g. via Futures#addCallback, to avoid deadlock.";
-    private static final RpcError DEADLOCK_RPCERROR = RpcResultBuilder.newError(ErrorType.APPLICATION, "lock-denied", DEADLOCK_MESSAGE);
+            "An attempt to block on a ListenableFuture via a get method from a write "
+            + "transaction submit was detected that would result in deadlock. The commit "
+            + "result must be obtained asynchronously, e.g. via Futures#addCallback, to avoid deadlock.";
+    private static final RpcError DEADLOCK_RPCERROR = RpcResultBuilder.newError(ErrorType.APPLICATION,
+            "lock-denied", DEADLOCK_MESSAGE);
 
     public static final Supplier<Exception> DEADLOCK_EXCEPTION_SUPPLIER =
-            () -> new TransactionCommitDeadlockException(DEADLOCK_MESSAGE, DEADLOCK_RPCERROR);
+        () -> new TransactionCommitDeadlockException(DEADLOCK_MESSAGE, DEADLOCK_RPCERROR);
 
     public TransactionCommitDeadlockException(final String message, final RpcError... errors) {
         super(message, errors);
index 7ac76e47b15048bbabfe70f49ed1c19fa48deb12..d92eed56a2bb613146efebcec2332ead08fcd5cb 100644 (file)
@@ -11,12 +11,7 @@ import org.opendaylight.yangtools.yang.common.OperationFailedException;
 import org.opendaylight.yangtools.yang.common.RpcError;
 
 /**
- *
- * Failed commit of asynchronous transaction
- *
- * This exception is raised and returned when transaction commit
- * failed.
- *
+ * Failed commit of asynchronous transaction. This exception is raised and returned when transaction commit failed.
  */
 public class TransactionCommitFailedException extends OperationFailedException {
 
index 0dd04d539c93617d95d4f6bffc834dc4c99947f8..4a3d86625c755c1042b8cbf6856175d6abe0a526 100644 (file)
@@ -11,9 +11,11 @@ import java.util.concurrent.ExecutorService;
 
 /**
  * Interface for publishing YANG-modeled notifications.
+ *
  * <p>
  * Users of this interface can publish any YANG-modeled notification which will
  * be delivered to all subscribed listeners.
+ *
  * <p>
  * Preferred way of publishing of notifications is done by invoking {@link #publish(Object)}.
  *
@@ -25,7 +27,7 @@ import java.util.concurrent.ExecutorService;
  * The metadata required to deliver a notification to the correct listeners is
  * extracted from the published notification.
  *
- *
+ * <p>
  * FIXME: Consider clarification of execution/delivery policy, how it will be
  * affected by Actor model and cluster-wide notifications.
  *
@@ -37,6 +39,7 @@ public interface NotificationPublishService<N> {
     /**
      * Publishes a notification and notifies subscribed listeners. All listener
      * notifications are done via a default executor.
+     *
      * <p>
      * <b>Note:</b> This call will block when the default executor is saturated
      * and the notification queue for this executor is full.
@@ -49,6 +52,7 @@ public interface NotificationPublishService<N> {
     /**
      * Publishes a notification and notifies subscribed listeners. All listener
      * notifications are done via the provided executor.
+     *
      * <p>
      * <b>Note:</b> Use only if necessary. Consider using
      * {@link #publish(Object)} for most use-cases.
index 0c04b936b668847d6914cefe522190751f10f733..1575cc57cc8f560e91ce9c56ac343e5b09dcd3d5 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.controller.md.sal.common.api.routing;
 
 import java.util.Map;
 import java.util.Set;
+
 /**
  * Event representing change in RPC routing table.
  *
@@ -16,11 +17,11 @@ import java.util.Set;
  * @param <C> Type, which is used to represent Routing context.
  * @param <P> Type of data tree path, which is used to identify route.
  */
-public interface RouteChange<C,P> {
+public interface RouteChange<C, P> {
 
     /**
-     *
      * Returns a map of removed routes in associated routing contexts.
+     *
      * <p>
      * This map represents routes, which were withdrawn from broker local
      * routing table and broker may need to forward RPC to other broker
@@ -29,16 +30,17 @@ public interface RouteChange<C,P> {
      * @return Map of contexts and removed routes
      */
     Map<C,Set<P>> getRemovals();
+
     /**
-    *
-    * Returns a map of announced routes in associated routing contexts.
-    *
-    * This map represents routes, which were announced by broker
-    * and are present in broker's local routing table. This routes
-    * are processed by implementations which are registered
-    * to originating broker.
-    *
-    * @return Map of contexts and announced routes
-    */
-    Map<C,Set<P>> getAnnouncements();
+     * Returns a map of announced routes in associated routing contexts.
+     *
+     * <p>
+     * This map represents routes, which were announced by broker
+     * and are present in broker's local routing table. This routes
+     * are processed by implementations which are registered
+     * to originating broker.
+     *
+     * @return Map of contexts and announced routes
+     */
+    Map<C, Set<P>> getAnnouncements();
 }
index b3b6fe6ee93ba44a30abaf32028044c7c89d006f..7283cd4e3fe9a4ac8eb711978b11ca87ae75bbdf 100644 (file)
@@ -8,18 +8,17 @@
 package org.opendaylight.controller.md.sal.common.api.routing;
 
 import java.util.EventListener;
+
 /**
+ * Listener which is interested in receiving RouteChangeEvents for its local broker.
  *
- * Listener which is interested in receiving RouteChangeEvents
- * for its local broker.
  * <p>
- * Listener is registerd via {@link RouteChangePublisher#registerRouteChangeListener(RouteChangeListener)}
- *
+ * Listener is registered via {@link RouteChangePublisher#registerRouteChangeListener(RouteChangeListener)}
  *
  * @param <C> Type, which is used to represent Routing context.
  * @param <P> Type of data tree path, which is used to identify route.
  */
-public interface RouteChangeListener<C,P> extends EventListener {
+public interface RouteChangeListener<C, P> extends EventListener {
 
     /**
      * Callback which is invoked if there is an rpc routing table change.
index 8636de2be03a907fb155f379bde50919a1dd594e..d8da5db5fb637f5083360769da054776f99b1a92 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.controller.md.sal.common.api.clustering;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
+
 import org.apache.commons.lang3.SerializationUtils;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;