checkStyleViolationSeverity=error implemented for mdsal-binding-api module 21/45321/4
authorjanab <brinda.jana@nexusis.com>
Wed, 7 Sep 2016 17:39:51 +0000 (10:39 -0700)
committerRobert Varga <nite@hq.sk>
Mon, 26 Sep 2016 01:33:43 +0000 (01:33 +0000)
Code review comments are implemented.

Change-Id: I925d71befa5806db4e7522c8009f5b125564adfe
Signed-off-by: Brinda Jana <brinda.jana@nexusis.com>
23 files changed:
binding/mdsal-binding-api/pom.xml
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/BindingService.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/BindingTransactionChain.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/CursorAwareWriteTransaction.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataBroker.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataObjectModification.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeChangeListener.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeChangeService.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeCommitCohort.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeCommitCohortRegistry.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeIdentifier.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeProducer.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeService.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/DataTreeWriteCursor.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/MountPoint.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/NotificationPublishService.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/NotificationRejectedException.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/NotificationService.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/ReadTransaction.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/RpcConsumerRegistry.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/TransactionFactory.java
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/WriteTransaction.java
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeIdentifierTest.java

index a108bbef4858d4106fdbfe83cb1a8a9523dc1eb2..f05f1e9a7df8c7bb10b1bcb71ce7192ee7ea3c48 100644 (file)
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <build>
+      <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+                </configuration>
+            </plugin>
+        </plugins>
+  </build>
+
   <scm>
     <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
index 3e83600e778ca11e76a850c41454b9dbaf5434a9..ed69c1dc4f6a0e365d515a26fabf80960c763a79 100644 (file)
@@ -9,9 +9,9 @@ package org.opendaylight.mdsal.binding.api;
 
 
 /**
- *
  * Marker interface for MD-SAL services which are available for users of MD-SAL.
  *
+ * <p>
  * BindingService is marker interface for infrastructure services provided by
  * the SAL. These services may be session-specific, and wrapped by custom
  * delegator patterns in order to introduce additional semantics / checks
index 25809b40a39836c096800972f41e211b9ebeb71e..bf1219cdd47fc80932a90698c4b2f9b57b72d720 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * A chain of transactions.
+ *
  * <p>
  * For more information about transaction chaining and transaction chains
  * see {@link TransactionChain}.
@@ -21,16 +22,12 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * @see TransactionChain
  *
  */
-public interface BindingTransactionChain extends TransactionFactory, TransactionChain<InstanceIdentifier<?>, DataObject> {
-    /**
-     * {@inheritDoc}
-     */
+public interface BindingTransactionChain extends TransactionFactory,
+        TransactionChain<InstanceIdentifier<?>, DataObject> {
+
     @Override
     ReadTransaction newReadOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     WriteTransaction newWriteOnlyTransaction();
 }
index 839c19cd955d37f99a4ba416c0808c0e8786235e..b47e3d46c7bb209da4c1b02af75276951f7f20a2 100644 (file)
@@ -23,6 +23,7 @@ public interface CursorAwareWriteTransaction extends DataTreeCursorProvider {
      * Create a {@link DataTreeWriteCursor} anchored at the specified path.
      * There can only be one cursor open at a time.
      *
+     * <p>
      * @param path Path at which the cursor is to be anchored
      * @return write cursor at the desired location.
      * @throws IllegalStateException when there's an open cursor, or this transaction is closed already.
@@ -34,11 +35,14 @@ public interface CursorAwareWriteTransaction extends DataTreeCursorProvider {
     /**
      * Cancels the transaction.
      *
+     * <p>
      * Transactions can only be cancelled if it was not yet submited.
      *
+     * <p>
      * Invoking cancel() on failed or already canceled will have no effect, and transaction is
      * considered cancelled.
      *
+     * <p>
      * Invoking cancel() on finished transaction (future returned by {@link #submit()} already
      * successfully completed) will always fail (return false).
      *
@@ -51,15 +55,18 @@ public interface CursorAwareWriteTransaction extends DataTreeCursorProvider {
     /**
      * 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.
      *
+     * <p>
      * This call logically seals the transaction, which prevents the client from further changing
      * data tree using this transaction's cursor. Any subsequent calls to
      * <code>createCursorCursor(DOMDataTreeIdentifier</code>
      * or any of the cursor's methods will fail with {@link IllegalStateException}.
      *
+     * <p>
      * The transaction is marked as submitted and enqueued into the shard back-end for
      * processing.
      */
index 2394ed6b861fce123e3c072ba5324dcbfe093dc7..c43889c0c8de7ff13c5ff39f534dc0088fdb0c88 100644 (file)
@@ -8,17 +8,15 @@
 package org.opendaylight.mdsal.binding.api;
 
 import org.opendaylight.mdsal.common.api.AsyncDataBroker;
-import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.TransactionChainFactory;
 import org.opendaylight.mdsal.common.api.TransactionChainListener;
-
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * 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.
+ *
  * <p>
  * For more information on usage, please see the documentation in {@link AsyncDataBroker}.
  *
@@ -26,22 +24,15 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * @see TransactionChainFactory
  */
 public interface DataBroker extends  AsyncDataBroker<InstanceIdentifier<?>, DataObject>,
-    TransactionChainFactory<InstanceIdentifier<?>, DataObject>, TransactionFactory, BindingService, DataTreeChangeService {
-    /**
-     * {@inheritDoc}
-     */
+    TransactionChainFactory<InstanceIdentifier<?>, DataObject>, TransactionFactory, BindingService,
+        DataTreeChangeService {
+
     @Override
     ReadTransaction newReadOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     WriteTransaction newWriteOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     BindingTransactionChain createTransactionChain(TransactionChainListener listener);
 }
index 26e9f40c1cb3a631028f577c0c131e1d66b26f59..fbd90eac206021d619ed628b262b449241823d73 100644 (file)
@@ -21,12 +21,15 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 /**
  * Modified Data Object.
  *
+ *<p>
  * Represents modification of Data Object
- * .
+ *
+ *<p>
  * @param <T> Type of modified object
  *
  */
-public interface DataObjectModification<T extends DataObject> extends org.opendaylight.yangtools.concepts.Identifiable<PathArgument> {
+public interface DataObjectModification<T extends DataObject> extends
+        org.opendaylight.yangtools.concepts.Identifiable<PathArgument> {
 
     /**
      * Represents type of modification which has occured.
@@ -34,19 +37,16 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      */
     enum ModificationType {
         /**
-         *
          * Child node (direct or indirect) was modified.
          *
          */
         SUBTREE_MODIFIED,
         /**
-         *
          * Node was explicitly created / overwritten.
          *
          */
         WRITE,
         /**
-         *
          * Node was deleted.
          *
          */
@@ -64,8 +64,7 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
     @Nonnull Class<T> getDataType();
 
     /**
-     *
-     * Returns type of modification
+     * Returns type of modification.
      *
      * @return type Type of performed modification.
      */
@@ -75,7 +74,6 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * Returns before-state of top level container. Implementations are encouraged, but not required
      * to provide this state.
      *
-     *
      * @return State of object before modification. Null if subtree was not present, or the
      *         implementation cannot provide the state.
      */
@@ -103,12 +101,14 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * @throws IllegalArgumentException If supplied {@code childType} class is not valid child according
      *         to generated model.
      */
-    <C extends ChildOf<? super T>> Collection<DataObjectModification<C>> getModifiedChildren(@Nonnull Class<C> childType);
+    <C extends ChildOf<? super T>> Collection<DataObjectModification<C>> getModifiedChildren(
+            @Nonnull Class<C> childType);
 
     /**
      * Returns container child modification if {@code child} was modified by this
      * modification.
      *
+     *<p>
      * For accessing all modified list items consider iterating over {@link #getModifiedChildren()}.
      *
      * @param child Type of child - must be only container
@@ -116,12 +116,14 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * @throws IllegalArgumentException If supplied {@code child} class is not valid child according
      *         to generated model.
      */
-    @Nullable <C extends ChildOf<? super T>> DataObjectModification<C> getModifiedChildContainer(@Nonnull Class<C> child);
+    @Nullable <C extends ChildOf<? super T>> DataObjectModification<C> getModifiedChildContainer(
+            @Nonnull Class<C> child);
 
     /**
      * Returns augmentation child modification if {@code augmentation} was modified by this
      * modification.
      *
+     *<p>
      * For accessing all modified list items consider iterating over {@link #getModifiedChildren()}.
      *
      * @param augmentation Type of augmentation - must be only container
@@ -129,7 +131,8 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * @throws IllegalArgumentException If supplied {@code augmentation} class is not valid augmentation
      *         according to generated model.
      */
-    @Nullable <C extends Augmentation<T> & DataObject> DataObjectModification<C> getModifiedAugmentation(@Nonnull Class<C> augmentation);
+    @Nullable <C extends Augmentation<T> & DataObject> DataObjectModification<C> getModifiedAugmentation(
+            @Nonnull Class<C> augmentation);
 
 
     /**
@@ -141,8 +144,8 @@ public interface DataObjectModification<T extends DataObject> extends org.openda
      * @throws IllegalArgumentException If supplied {@code listItem} class is not valid child according
      *         to generated model.
      */
-    <C extends Identifiable<K> & ChildOf<? super T>, K extends Identifier<C>> DataObjectModification<C> getModifiedChildListItem(
-            @Nonnull Class<C> listItem,@Nonnull  K listKey);
+    <C extends Identifiable<K> & ChildOf<? super T>, K extends Identifier<C>> DataObjectModification<C>
+            getModifiedChildListItem(@Nonnull Class<C> listItem,@Nonnull  K listKey);
 
     /**
      * Returns a child modification if a node identified by {@code childArgument} was modified by
index 1c28e8705f3f7e781f20da62cea862d9245854f0..2dc28988a10b055a3bb61399fbd6c43505621b35 100644 (file)
@@ -33,6 +33,7 @@ public interface DataTreeChangeListener<T extends DataObject> extends EventListe
      * to recover from such events. Event producers are expected to exert reasonable
      * effort to suppress such events.
      *
+     *<p>
      * In other words, it is completely acceptable to observe
      * a {@link DataObjectModification}, while the state observed before and
      * after- data items compare as equal.
index 50d20c993f3f842b006ad63b78408dbeb1f355dd..aae09b4886c695296b1b32bfccae7c82af87efda 100644 (file)
@@ -19,14 +19,16 @@ public interface DataTreeChangeService extends BindingService {
      * Registers a {@link DataTreeChangeListener} 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 represented using {@link DataTreeIdentifier}.
-     * <p>
      *
+     * <p>
      * You are able to register for data change notifications for a subtree or leaf
      * even if it does not exist. You will receive notification once that node is
      * created.
+     *
      * <p>
      * If there is any pre-existing data in the data tree for the path for which you are
      * registering, you will receive an initial data change event, which will
@@ -36,6 +38,7 @@ public interface DataTreeChangeService extends BindingService {
      * This method returns a {@link ListenerRegistration} object. To
      * "unregister" your listener for changes call the {@link ListenerRegistration#close()}
      * method on the returned object.
+     *
      * <p>
      * You MUST explicitly unregister your listener when you no longer want to receive
      * notifications. This is especially true in OSGi environments, where failure to
@@ -50,5 +53,6 @@ public interface DataTreeChangeService extends BindingService {
      *         your listener using {@link ListenerRegistration#close()} to stop
      *         delivery of change events.
      */
-    @Nonnull <T extends DataObject,L extends DataTreeChangeListener<T>> ListenerRegistration<L> registerDataTreeChangeListener(@Nonnull DataTreeIdentifier<T> treeId, @Nonnull L listener);
+    @Nonnull <T extends DataObject,L extends DataTreeChangeListener<T>> ListenerRegistration<L>
+            registerDataTreeChangeListener(@Nonnull DataTreeIdentifier<T> treeId, @Nonnull L listener);
 }
\ No newline at end of file
index 44db3af9cd51db9feef1c3860dfcd7a7829ffb60..5384edaf7a16a58db2526137be7cf12f0905d997 100644 (file)
@@ -15,8 +15,6 @@ import org.opendaylight.mdsal.common.api.PostCanCommitStep;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 
 /**
- * **
- *
  * Commit cohort participating in commit of data modification, which can validate data tree
  * modifications, with option to reject supplied modification, and with callbacks describing state
  * of commit.
@@ -26,20 +24,22 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
  * {@link DataTreeCommitCohort}s are hooked up into commit of data tree changes and MAY
  * negatively affect performance of data broker / store.
  *
+ * <p>
  * Implementations of this interface are discouraged, unless you really need ability to veto data
  * tree changes, or to provide external state change in sync with visibility of commited data.
  *
- *
  * <h2>Implementation requirements</h2>
  *
  * <h3>Correctness assumptions</h3> Implementation SHOULD use only provided
  * {@link DataTreeModification} for validation purposes.
  *
+ * <p>
  * Use of any other external mutable state is discouraged, implementation MUST NOT use any
  * transaction related APIs on same data broker / data store instance during invocation of
  * callbacks, except ones provided as argument. Note that this MAY BE enforced by some
  * implementations of {@link DataBroker} or Commit coordinator
  *
+ * <p>
  * Note that this may be enforced by some implementations of {@link DataTreeCommitCohortRegistry}
  * and such calls may fail.
  *
@@ -48,18 +48,20 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
  * {@link PostCanCommitStep#preCommit()} and
  * {@link org.opendaylight.mdsal.common.api.PostPreCommitStep#commit()} callback was invoked.
  *
- *
  * <h2>Usage patterns</h2>
  *
  * <h3>Data Tree Validator</h3>
  *
+ * <p>
  * Validator is implementation, which only validates {@link DataTreeModification} and does not
  * retain any state derived from edited data - does not care if {@link DataTreeModification} was
  * rejected afterwards or transaction was cancelled.
  *
+ * <p>
  * Implementation may opt-out from receiving {@code preCommit()}, {@code commit()}, {@code abort()}
  * callbacks by returning {@link PostCanCommitStep#NOOP}.
  *
+ * <p>
  * TODO: Provide example and describe more usage patterns
  *
  * @author Tony Tkacik &lt;ttkacik@cisco.com&gt;
index da73700553f2b1db669b090269dc52a7f69a65e2..ec30a938e78ac931669e583ce73966063758fd74 100644 (file)
@@ -12,9 +12,9 @@ import org.opendaylight.yangtools.concepts.ObjectRegistration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 
 /**
- *
  * Commit Cohort registry.
  *
+ * <p>
  * See {@link DataTreeCommitCohort} for more details.
  *
  * @author Tony Tkacik &lt;ttkacik@cisco.com&gt;
index 0ae385641f55d5b9e93cc0296645452b9c56dab6..52e2317cb34ee61dce30a9c7a3e34ea194abdc04 100644 (file)
@@ -20,7 +20,8 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * A unique identifier for a particular subtree. It is composed of the logical
  * data store type and the instance identifier of the root node.
  */
-public final class DataTreeIdentifier<T extends DataObject> implements Immutable, Path<DataTreeIdentifier<?>>, Serializable {
+public final class DataTreeIdentifier<T extends DataObject> implements Immutable,
+        Path<DataTreeIdentifier<?>>, Serializable {
     private static final long serialVersionUID = 1L;
     private final InstanceIdentifier<T> rootIdentifier;
     private final LogicalDatastoreType datastoreType;
index 0520b40e2112ccd0d0829351a028b67e4afaa0e5..09ab7693b7a25c30c98e81ca1396e2a93305c527 100644 (file)
@@ -16,19 +16,23 @@ import javax.annotation.Nonnull;
  * either submitted or cancelled before another one can be open. Once a transaction is submitted, it
  * will proceed to be committed asynchronously.
  *
+ *<p>
  * Each instance has an upper bound on the number of transactions which can be in-flight, once that
  * capacity is exceeded, an attempt to create a new transaction will block until some transactions
  * complete.
  *
+ *<p>
  * Each {@link DataTreeProducer} can be in two logical states, bound and unbound, which define the
  * lifecycle rules for when is it legal to create and submit transactions in relationship with
  * {@link DataTreeListener} callbacks.
  *
+ *<p>
  * When a producer is first created, it is unbound. In this state the producer can be accessed by
  * any application thread to allocate or submit transactions, as long as the 'single open
  * transaction' rule is maintained. The producer and any transaction object MUST NOT be accessed,
  * directly or indirectly, from a {@link DataTreeListener} callback.
  *
+ * <p>
  * When a producer is referenced in a call to
  * {@link DataTreeService#registerListener(DataTreeListener, java.util.Collection, boolean, java.util.Collection)}
  * , an attempt will be made to bind the producer to the specified {@link DataTreeListener}. Such an
@@ -59,17 +63,20 @@ public interface DataTreeProducer extends DataTreeProducerFactory, AutoCloseable
     CursorAwareWriteTransaction createTransaction(boolean isolated);
 
     /**
-     * {@inheritDoc}
+     * {@inheritDoc}.
      *
+     *<p>
      * When invoked on a {@link DataTreeProducer}, this method has additional restrictions. There
      * may not be an open transaction from this producer. The method needs to be invoked in
      * appropriate context, e.g. bound or unbound.
      *
+     *<p>
      * Specified subtrees must be accessible by this producer. Accessible means they are a subset of
      * the subtrees specified when the producer is instantiated. The set is further reduced as child
      * producers are instantiated -- if you create a producer for /a and then a child for /a/b, /a/b
      * is not accessible from the first producer.
      *
+     *<p>
      * Once this method returns successfully, this (parent) producer loses the ability to access the
      * specified paths until the resulting (child) producer is shut down.
      *
@@ -86,7 +93,7 @@ public interface DataTreeProducer extends DataTreeProducerFactory, AutoCloseable
     DataTreeProducer createProducer(@Nonnull Collection<DataTreeIdentifier<?>> subtrees);
 
     /**
-     * {@inheritDoc}
+     * {@inheritDoc}.
      *
      * @throws DataTreeProducerBusyException when there is an open transaction.
      */
index de578a1439643c2d757226bc40b31b65daaa4114..c2db154647d903587f304e338547fe093aa72963 100644 (file)
@@ -16,10 +16,12 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
  * 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.
  *
+ *<p>
  * 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.
  *
+ *<p>
  * 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
@@ -34,12 +36,14 @@ public interface DataTreeService extends DataTreeProducerFactory, BindingService
      * a smaller number of them will be reported, possibly hiding some data transitions (like
      * flaps).
      *
+     *<p>
      * 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.
      *
+     *<p>
      * 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.
index 653c6a4e73b0ce433923cfa6752c5abda02aa4c1..a2e7b5b4d4f21a43594f15a9108420d4042d2af7 100644 (file)
@@ -13,8 +13,9 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.BackendFailedException;
 
 /**
- * {@inheritDoc}
+ * {@inheritDoc}.
  *
+ * <p>
  * In addition this cursor also provides write operations(delete, merge, write).
  */
 public interface DataTreeWriteCursor extends DataTreeCursor {
index d05b13f2f13167d265611e9d807d1fd844b81e0c..8e461ad6206f908744092c48bad4cba0c6b68e73 100644 (file)
@@ -11,7 +11,7 @@ import com.google.common.base.Optional;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public interface MountPoint extends Identifiable<InstanceIdentifier<?>>{
+public interface MountPoint extends Identifiable<InstanceIdentifier<?>> {
 
     <T extends BindingService> Optional<T> getService(Class<T> service);
 
index e6c527d03c4e9d46582611d1d138589739a24cbf..1541008f3c84ccd330642198644b4fa214357c8c 100644 (file)
@@ -23,6 +23,7 @@ import org.opendaylight.yangtools.yang.binding.Notification;
  * - {@link #offerNotification(Notification, int, TimeUnit)}, which may block
  *   for specified time if resources are thin.
  *
+ *<p>
  * The actual delivery to listeners is asynchronous and implementation-specific.
  * Users of this interface should not make any assumptions as to whether the
  * notification has or has not been seen.
@@ -33,7 +34,8 @@ public interface NotificationPublishService extends BindingService {
      * Well-known value indicating that the binding-aware implementation is currently not
      * able to accept a notification.
      */
-    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(new NotificationRejectedException("Rejected due to resource constraints."));
+    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(
+            new NotificationRejectedException("Rejected due to resource constraints."));
 
     /**
      * Publishes a notification to subscribed listeners. This initiates
@@ -55,6 +57,7 @@ public interface NotificationPublishService extends BindingService {
      * notification, but delivery to the listeners can happen asynchronously, potentially after a
      * call to this method returns.
      *
+     * <p>
      * Still guaranteed not to block. Returns Listenable Future which will complete once.
      *
      * @param notification the notification to publish.
index b409ca67ea74e197882cb9258da9bc3b10437ad7..2517e87f8a78f3e5956b7dee1508a4b625b6fbf0 100644 (file)
@@ -8,13 +8,11 @@
 package org.opendaylight.mdsal.binding.api;
 
 /**
- * <p>
  * This exception indicates that given notification can not be processed by corresponding mechanism.
  * More info can be provided in message.
- * </p>
+ *
  * <p>
  * Expected use: {@link NotificationPublishService}
- * </p>
  */
 public class NotificationRejectedException extends Exception {
     private static final long serialVersionUID = 1L;
index 34f88a1b87d60d76dee9b2895fff6ade8b5bfe90..42729f651254ffaa3d4cb7964b8e15b018994534 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.yangtools.yang.binding.NotificationListener;
 /**
  * Notification broker which allows clients to subscribe for and publish YANG-modeled notifications.
  *
+ *<p>
  * Each YANG module which defines notifications results in a generated interface
  * <code>{ModuleName}Listener</code> which handles all the notifications defined in the YANG model.
  * Each notification type translates to a specific method of the form
@@ -23,54 +24,59 @@ import org.opendaylight.yangtools.yang.binding.NotificationListener;
  * method.
  *
  * <b>Dispatch Listener Example</b>
+ *
  * <p>
  * Lets assume we have following YANG model:
  *
  * <pre>
  * module example {
  *      ...
- * 
+ *
  *      notification start {
  *          ...
  *      }
- * 
+ *
  *      notification stop {
  *           ...
  *      }
  * }
  * </pre>
  *
+ * <p>
  * The generated interface will be:
- * 
+ *
  * <pre>
  * public interface ExampleListener extends NotificationListener {
  *     void onStart(Start notification);
- * 
+ *
  *     void onStop(Stop notification);
  * }
  * </pre>
- * 
+ *
+ * <p>
  * The following defines an implementation of the generated interface:
- * 
+ *
  * <pre>
  * public class MyExampleListener implements ExampleListener {
  *     public void onStart(Start notification) {
  *         // do something
  *     }
- * 
+ *
  *     public void onStop(Stop notification) {
  *         // do something
  *     }
  * }
  * </pre>
- * 
+ *
+ * <p>
  * The implementation is registered as follows:
- * 
+ *
  * <pre>
  * MyExampleListener listener = new MyExampleListener();
  * ListenerRegistration&lt;NotificationListener&gt; reg = service.registerNotificationListener(listener);
  * </pre>
- * 
+ *
+ * <p>
  * The <code>onStart</code> method will be invoked when someone publishes a <code>Start</code>
  * notification and the <code>onStop</code> method will be invoked when someone publishes a
  * <code>Stop</code> notification.
@@ -81,6 +87,7 @@ public interface NotificationService extends BindingService {
      * {@link NotificationListener}. The listener is registered for all notifications present in
      * the implemented interface.
      *
+     * <p>
      * @param listener the listener implementation that will receive notifications.
      * @return a {@link ListenerRegistration} instance that should be used to unregister the listener
      *         by invoking the {@link ListenerRegistration#close()} method when no longer needed.
index ee40cdd760ab2c639065889d8933a88138720962..9a4c682b31d501976e226c32404b60622310b9e6 100644 (file)
@@ -7,17 +7,18 @@
  */
 package org.opendaylight.mdsal.binding.api;
 
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
 import org.opendaylight.mdsal.common.api.AsyncReadTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.ReadFailedException;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
 
 /**
  * A transaction that provides a stateful read-only view of the data tree.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in
  *  {@link org.opendaylight.mdsal.common.api.AsyncReadTransaction}.
@@ -26,6 +27,7 @@ public interface ReadTransaction extends AsyncReadTransaction<InstanceIdentifier
 
     /**
      * Reads data from the provided logical data store located at the provided path.
+     *
      *<p>
      * If the target is a subtree, then the whole subtree is read (and will be
      * accessible from the returned data object).
index 755b88c976781ebff0a5663fd7f5aea944ef579a..d2e0e985fee66795133bf22daa258c8001b96fa3 100644 (file)
@@ -14,6 +14,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
 /**
  * Provides access to registered Remote Procedure Call (RPC) service implementations. The RPCs are
  * defined in YANG models.
+ *
  * <p>
  * RPC implementations are registered using the {@link RpcProviderService}.
  *
@@ -25,8 +26,8 @@ public interface RpcConsumerRegistry extends BindingService {
      * <p>
      * The returned instance is not an actual implementation of the RPC service interface, but a
      * proxy implementation of the interface that forwards to an actual implementation, if any.
-     * <p>
      *
+     * <p>
      * The following describes the behavior of the proxy when invoking RPC methods:
      * <ul>
      * <li>If an actual implementation is registered with the MD-SAL, all invocations are forwarded
@@ -38,6 +39,7 @@ public interface RpcConsumerRegistry extends BindingService {
      * </ul>
      *
      * The returned proxy is automatically updated with the most recent registered implementation.
+     *
      * <p>
      * The generated RPC method APIs require implementors to return a
      * {@link java.util.concurrent.Future Future} instance that wraps the
@@ -46,13 +48,14 @@ public interface RpcConsumerRegistry extends BindingService {
      * {@link java.util.concurrent.Future Future} result. Instead, it is recommended to use
      * {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future)}
      * or
-     * {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future, java.util.concurrent.Executor)}
-     * to listen for Rpc Result. This will asynchronously listen for future result in executor and
-     * will not block current thread.
+     * {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future,
+     * java.util.concurrent.Executor)} to listen for Rpc Result. This will asynchronously listen for future result
+     * in executor and will not block current thread.
      *
      * <pre>
      *   final Future&lt;RpcResult&lt;SomeRpcOutput&gt;&gt; future = someRpcService.someRpc( ... );
-     *   Futures.addCallback(JdkFutureAdapters.listenInThreadPool(future), new FutureCallback&lt;RpcResult&lt;SomeRpcOutput&gt;&gt;() {
+     *   Futures.addCallback(JdkFutureAdapters.listenInThreadPool(future), new FutureCallback&lt;RpcResult&lt;
+     *   SomeRpcOutput&gt;&gt;() {
      *
      *       public void onSuccess(RpcResult&lt;SomeRpcOutput&gt; result) {
      *          // process result ...
index 32ad78d990220149d2531abd6dc0b037f9aea390..4d6adcde4d4116aa4c0e3a478012ea08fd4808b4 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.mdsal.common.api.AsyncDataTransactionFactory;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public interface TransactionFactory extends AsyncDataTransactionFactory<InstanceIdentifier<?>, DataObject>{
+public interface TransactionFactory extends AsyncDataTransactionFactory<InstanceIdentifier<?>, DataObject> {
 
     @Override
     ReadTransaction newReadOnlyTransaction();
index 195610a8ad04dc2eb3fd5959359374721c3e3256..d9d029a0979e1e70fef3ae5446c37ef43cd69ab5 100644 (file)
@@ -15,6 +15,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * A transaction that provides mutation capabilities on a data tree.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
  */
@@ -23,10 +24,12 @@ public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifi
     /**
      * Stores a piece of data at the specified path. This acts as an add / replace
      * operation, which is to say that whole subtree will be replaced by the specified data.
-     * * <p>
+     *
+     * <p>
      * This method does not automatically create missing parent nodes. It is equivalent to invoking
      * {@link #put(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)}
      * with <code>createMissingParents</code> set to false.
+     *
      * <p>
      * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
      * <p>
@@ -49,14 +52,17 @@ public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifi
      * Stores a piece of data at the specified path. This acts as an add /
      * replace operation, which is to say that whole subtree will be replaced by
      * the specified data.
+     *
      * <p>
      * For more information on usage and examples, please see the documentation
      * in {@link AsyncWriteTransaction}.
+     *
      * <p>
      * If you need to make sure that a parent object exists but you do not want
      * modify its pre-existing state by using put, consider using {@link #merge}
      * instead.
      *
+     * <p>
      * Note: Using <code>createMissingParents</code> with value true, may
      * introduce garbage in data store, or recreate nodes, which were deleted by
      * previous transaction.
@@ -80,12 +86,16 @@ public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifi
      * 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>
      * This method does not automatically create missing parent nodes. It is equivalent to invoking
      * {@link #merge(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)}
      * with <code>createMissingParents</code> set to false.
+     *
      * <p>
-     * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
+     * For more information on usage and examples, please see the documentation in
+     * {@link AsyncWriteTransaction}.
+     *
      *<p>
      * If you require an explicit replace operation, use {@link #put} instead.
      * @param store
@@ -103,9 +113,11 @@ public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifi
      * 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>
      * For more information on usage and examples, please see the documentation
      * in {@link AsyncWriteTransaction}.
+     *
      * <p>
      * If you require an explicit replace operation, use {@link #put} instead.
      *
index 7df98fabcb614bb705f17f79864640b505461055..6e22e98029c999241b6bd925a3e59a45b2b7963a 100644 (file)
@@ -40,8 +40,8 @@ public class DataTreeIdentifierTest {
 
     @Test
     public void hashCodeTest() {
-        assertEquals("hashCode", TEST_IDENTIFIER1.hashCode(), DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL,
-                InstanceIdentifier.create(TestDataObject1.class)).hashCode());
+        assertEquals("hashCode", TEST_IDENTIFIER1.hashCode(), DataTreeIdentifier.create(
+                LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(TestDataObject1.class)).hashCode());
         assertNotEquals("hashCode", TEST_IDENTIFIER1.hashCode(), TEST_IDENTIFIER2.hashCode());
     }