Cleanup imports/whitespace in MD-SAL
authorRobert Varga <rovarga@cisco.com>
Fri, 7 Feb 2014 20:01:21 +0000 (21:01 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 10 Feb 2014 11:54:33 +0000 (11:54 +0000)
Change-Id: I0f18ffe229ed213308a0cd5cf343fd64ff79a17c
Signed-off-by: Robert Varga <rovarga@cisco.com>
40 files changed:
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareConsumer.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/AbstractBindingAwareProvider.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcProviderRegistry.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataModificationTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataProviderService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataRefresher.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/RuntimeDataProvider.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/mount/MountInstance.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/mount/MountProviderService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/rpc/RpcRouter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModule.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModule.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRoutingTableImpl.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/SingletonHolder.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/DataBrokerImpl.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/DataTransactionImpl.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcProviderRegistryImpl.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/connect/dom/DataModificationTracker.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/AbstractDataServiceTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/RuntimeCodeGeneratorTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/BindingBrokerTestFactory.java
opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/AbstractBindingSalConsumerInstance.java
opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/AbstractBindingSalProviderInstance.java
opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/BindingContextUtils.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataChangePublisher.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-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/ListenerRegistry.java
opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/AbstractLockableDelegator.java
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/AbstractProvider.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataModificationTransaction.java
opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/mount/MountProvisionInstance.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/NotificationModule.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/NotificationRouterImpl.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/MountProviderServiceProxy.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/spi/RpcRouter.java

index fc145c8b16e0d9dff7e0c29e480ff5fe9935f4dd..02bb6b35b9165e29aa22f077488c1969354a2175 100644 (file)
@@ -7,10 +7,7 @@
  */
 package org.opendaylight.controller.sal.binding.api;
 
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
 
 public abstract class AbstractBindingAwareConsumer extends AbstractBrokerAwareActivator implements BindingAwareConsumer {
 
index 9d3bff4ef8b9d4d954f3f10b31d3789d655ad59e..068b6c204f3d75db69a57dcd0db873548d158343 100644 (file)
@@ -13,12 +13,10 @@ import java.util.Collections;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.opendaylight.yangtools.yang.binding.RpcService;
-import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
 
 public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareActivator implements BindingAwareProvider {
-    
+
     @Override
     protected final void onBrokerAvailable(BindingAwareBroker broker, BundleContext context) {
         ProviderContext ctx = broker.registerProvider(this, context);
@@ -57,13 +55,13 @@ public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareAc
     public Collection<? extends RpcService> getImplementations() {
         return Collections.emptySet();
     }
-    
+
     /**
      * Initialization of consumer context.
-     * 
+     *
      * {@link ProviderContext} is replacement of {@link ConsumerContext}
      * so this method is not needed in case of Provider.
-     * 
+     *
      */
     @Deprecated
     @Override
index c28b03eb65a092817917956cc9794a8267c41479..08029dc52fa2c35fe1ea0f4b7994ef6eecf3fbe2 100644 (file)
@@ -12,7 +12,6 @@ import java.util.concurrent.ExecutorService;
 
 import org.opendaylight.controller.md.sal.common.api.notify.NotificationPublishService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
 public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
@@ -20,7 +19,7 @@ public interface NotificationProviderService extends NotificationService, Notifi
 
     /**
      * Deprecated. Use {@link #publish(Notification)}.
-     * 
+     *
      * @param notification
      */
     @Deprecated
@@ -28,7 +27,7 @@ public interface NotificationProviderService extends NotificationService, Notifi
 
     /**
      * Deprecated. Use {@link #publish(Notification,ExecutorService)}.
-     * 
+     *
      * @param notification
      */
     @Deprecated
@@ -36,17 +35,17 @@ public interface NotificationProviderService extends NotificationService, Notifi
 
     /**
      * Publishes a notification.
-     * 
+     *
      * @param Notification
      *            notification to publish.
-     * 
+     *
      */
     @Override
     void publish(Notification notification);
 
     /**
      * Publishes a notification, listener calls are done in provided executor.
-     * 
+     *
      */
     @Override
     void publish(Notification notification, ExecutorService service);
index 10b29f721873bd2bd78573b071f3e771e5549d3c..24ca2a3de7e13073b0e61e2be930ebabf04d9436 100644 (file)
@@ -7,25 +7,23 @@
  */
 package org.opendaylight.controller.sal.binding.api;
 
-import org.opendaylight.controller.md.sal.common.api.notify.NotificationSubscriptionService;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
 public interface NotificationService extends BindingAwareService {
     /**
-     * 
+     *
      * Deprecated: use {@link #addNotificationListener(Class, NotificationListener)} istead.
-     * 
+     *
      * @param listener
      */
     @Deprecated
     <T extends Notification> void addNotificationListener(Class<T> notificationType, NotificationListener<T> listener);
 
     /**
-     * 
+     *
      * Deprecated: use {@link #addNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener)} istead.
-     * 
+     *
      * @param listener
      */
     @Deprecated
@@ -45,10 +43,10 @@ public interface NotificationService extends BindingAwareService {
     @Deprecated
     <T extends Notification> void removeNotificationListener(Class<T> notificationType, NotificationListener<T> listener);
 
-    
+
     /**
      * Register a generic listener for specified notification type only.
-     * 
+     *
      * @param notificationType
      * @param listener
      * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method.
@@ -61,7 +59,7 @@ public interface NotificationService extends BindingAwareService {
      * Register a listener which implements generated notification interfaces derived from
      * {@link org.opendaylight.yangtools.yang.binding.NotificationListener}.
      * Listener is registered for all notifications present in implemented interfaces.
-     * 
+     *
      * @param listener
      * @return Registration for listener. To unregister listener invoke {@link Registration#close()} method.
      */
index fcf8ed5c9e65e40ce4bdb79eb9d96e440fcf1c21..c64e24c9c232d2aab54847713c7f5f1c7aa236dd 100644 (file)
@@ -11,23 +11,22 @@ import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublishe
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
 /**
  * Interface defining provider's access to the Rpc Registry which could be used
  * to register their implementations of service to the MD-SAL.
- * 
+ *
  * @author ttkacik
- * 
+ *
  */
 public interface RpcProviderRegistry extends //
         RpcConsumerRegistry, //
         RouteChangePublisher<RpcContextIdentifier, InstanceIdentifier<?>> {
     /**
      * Registers an global RpcService implementation.
-     * 
+     *
      * @param type
      * @param implementation
      * @return
@@ -36,10 +35,10 @@ public interface RpcProviderRegistry extends //
             throws IllegalStateException;
 
     /**
-     * 
+     *
      * Register an Routed RpcService where routing is determined on annotated
      * (in YANG model) context-reference and value of annotated leaf.
-     * 
+     *
      * @param type
      *            Type of RpcService, use generated interface class, not your
      *            implementation clas
@@ -47,7 +46,7 @@ public interface RpcProviderRegistry extends //
      *            Implementation of RpcService
      * @return Registration object for routed Rpc which could be used to close
      *         an
-     * 
+     *
      * @throws IllegalStateException
      */
     <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type, T implementation)
index 9ce11c71e4b6d1a41fa61a4dfa94401700db97e1..719063832314cfa069121fb92d79c62165439424 100644 (file)
@@ -11,9 +11,9 @@ import java.util.EventListener;
 import java.util.concurrent.Future;
 
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
+import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
 import org.opendaylight.controller.md.sal.common.api.data.DataModification;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
@@ -22,28 +22,28 @@ public interface DataModificationTransaction extends DataModification<InstanceId
 
     /**
      * Returns an unique identifier for transaction
-     * 
+     *
      */
     @Override
     public Object getIdentifier();
-    
+
     /**
      * Initiates a two-phase commit of candidate data.
-     * 
+     *
      * <p>
      * The {@link Consumer} could initiate a commit of candidate data
-     * 
+     *
      * <p>
      * The successful commit changes the state of the system and may affect
      * several components.
-     * 
+     *
      * <p>
      * The effects of successful commit of data are described in the
      * specifications and YANG models describing the {@link Provider} components
      * of controller. It is assumed that {@link Consumer} has an understanding
      * of this changes.
-     * 
-     * 
+     *
+     *
      * @see DataCommitHandler for further information how two-phase commit is
      *      processed.
      * @param store
@@ -53,12 +53,12 @@ public interface DataModificationTransaction extends DataModification<InstanceId
      */
     @Override
     public Future<RpcResult<TransactionStatus>> commit();
-    
-    
-    
+
+
+
     /**
      * Register a listener for transaction
-     * 
+     *
      * @param listener
      * @return
      */
@@ -68,13 +68,13 @@ public interface DataModificationTransaction extends DataModification<InstanceId
 
     /**
      * Listener for transaction state changes
-     * 
+     *
      *
      */
     public interface DataTransactionListener extends EventListener {
         /**
          * Callback is invoked after each transaction status change.
-         * 
+         *
          * @param transaction Transaction
          * @param status New status
          */
index 523abb50cab4150421c46d61d6aa345ccab98cd5..7d662cfcf20ebc60bd722fded3a6b04ab6eda9c7 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.controller.sal.binding.api.data;
 import org.opendaylight.controller.md.sal.common.api.data.DataProvisionService;
 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.opendaylight.controller.sal.common.DataStoreIdentifier;
 import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -23,15 +22,15 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  */
 public interface DataProviderService extends DataBrokerService, DataProvisionService<InstanceIdentifier<? extends DataObject>, DataObject> {
 
-    
+
     /**
      * Registers a data reader for particular subtree of overal YANG data tree.
-     * 
-     * Registered data reader is called if anyone tries to read data from 
+     *
+     * Registered data reader is called if anyone tries to read data from
      * paths which are nested to provided path.
-     * 
+     *
      * @param path Subpath which is handled by registered data reader
-     * @param reader Instance of reader which 
+     * @param reader Instance of reader which
      * @return Registration object for reader. Invoking {@link Registration#close()} will unregister reader.
      */
     Registration<DataReader<InstanceIdentifier<? extends DataObject>,DataObject>> registerDataReader(InstanceIdentifier<? extends DataObject> path,DataReader<InstanceIdentifier<? extends DataObject>,DataObject> reader);
index f54e1315be06a546ad6d62c4a92a693c8b3197cd..3334f2a037b119711916a52ad7c9d86b6424201d 100644 (file)
@@ -8,19 +8,18 @@
 package org.opendaylight.controller.sal.binding.api.data;
 
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality;
 
 /**
  * Trigger for refreshing of the data exposed by the {@link Provider}
- * 
- * 
- * 
+ *
+ *
+ *
  */
 public interface DataRefresher extends BindingAwareProvider.ProviderFunctionality {
 
     /**
      * Fired when some component explicitly requested the data refresh.
-     * 
+     *
      * The provider which exposed the {@link DataRefresher} should republish its
      * provided data by editing the data in all affected data stores.
      */
index 652e14bfa5b6683797ff9b0d3e339373e8bcdb61..85a2b82ee0397174966e8e584a6607eb61de3433 100644 (file)
@@ -7,23 +7,19 @@
  */
 package org.opendaylight.controller.sal.binding.api.data;
 
-import java.util.Set;
-
 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality;
-import org.opendaylight.controller.sal.common.DataStoreIdentifier;
 import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.DataRoot;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
- * Utility interface which does type capture for BindingAware DataReader. 
- * 
- * @author 
+ * Utility interface which does type capture for BindingAware DataReader.
+ *
+ * @author
  *
  */
 public interface RuntimeDataProvider extends ProviderFunctionality,DataReader<InstanceIdentifier<? extends DataObject>, DataObject> {
-    
-    
+
+
 
 }
index 844b03a18050de2a80f494675f8624214ec722f0..b4441601cb5c23c52b3e4b63f56af73a40394a03 100644 (file)
@@ -12,7 +12,6 @@ import org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry;
 import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.binding.RpcService;
 
 public interface MountInstance //
         extends //
index f7b584507a85f500d1d603b59736ab48ea37a73f..6af9093fdd4c79c101808e528c8546b26a8b3056 100644 (file)
@@ -9,21 +9,19 @@ package org.opendaylight.controller.sal.binding.api.mount;
 
 import java.util.EventListener;
 
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * Provider MountProviderService, this version allows access to MD-SAL services
  * specific for this mountpoint and registration / provision of interfaces for
  * mount point.
- * 
+ *
  * @author ttkacik
- * 
+ *
  */
 public interface MountProviderService extends MountService {
-    
+
     @Override
     public MountProviderInstance getMountPoint(InstanceIdentifier<?> path);
 
index 31fed62d876ef5b8e25512023393204bf1856d02..81fe39c62e0c927cbe43110fabe76af640b71874 100644 (file)
@@ -14,17 +14,16 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcR
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.binding.RpcImplementation;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
 /**
  * RpcRouter is responsible for selecting RpcService based on provided routing
  * context identifier {@link RpcRoutingTable#getContextIdentifier()} and path in
  * overal data tree (@link {@link InstanceIdentifier}.
- * 
- * 
+ *
+ *
  * @author Tony Tkacik <ttkacik@cisco.com>
- * 
+ *
  * @param <T>
  *            Type of RpcService for which router provides routing information
  *            and route selection.
@@ -34,23 +33,23 @@ public interface RpcRouter<T extends RpcService> extends //
 
     /**
      * Returns a type of RpcService which is served by this instance of router.
-     * 
+     *
      * @return type of RpcService which is served by this instance of router.
      */
     Class<T> getServiceType();
-    
-    
+
+
     /**
      * Returns a instance of T which is associated with this router instance
      * and routes messages based on routing tables.
-     * 
+     *
      * @return type of RpcService which is served by this instance of router.
      */
     T getInvocationProxy();
 
     /**
      * Returns a routing table for particular route context
-     * 
+     *
      * @param routeContext
      * @return Routing Table for particular route context.
      */
@@ -59,7 +58,7 @@ public interface RpcRouter<T extends RpcService> extends //
     /**
      * Returns an instance of RpcService which is responsible for processing
      * particular path.
-     * 
+     *
      * @param context
      *            Rpc Routing Context
      * @param path
@@ -72,15 +71,15 @@ public interface RpcRouter<T extends RpcService> extends //
     /**
      * Returns a default fallback instance of RpcService which is responsible
      * for handling all unknown imports.
-     * 
+     *
      * @return default instance responsible for processing RPCs.
      */
     T getDefaultService();
 
     Set<Class<? extends BaseIdentity>> getContexts();
-    
+
     RoutedRpcRegistration<T> addRoutedRpcImplementation(T service);
-    
+
     RpcRegistration<T> registerDefaultService(T service);
 
 }
index ffc83792284cbd0dc044cef26dfc5d0b43e99fe5..44a508c0a0bd2561c20517323f47735479688611 100644 (file)
@@ -23,8 +23,6 @@ import org.opendaylight.controller.sal.binding.impl.forward.DomForwardedBindingB
 import org.opendaylight.controller.sal.binding.impl.forward.DomForwardingUtils;\r
 import org.osgi.framework.BundleContext;\r
 \r
-import com.google.common.util.concurrent.MoreExecutors;\r
-\r
 /**\r
 *\r
 */\r
index 0a503d56428352ee7a4da76be4ae738e44fddc7f..b6c27a6332c4fdc7ddc6c08e25970f51431c8260 100644 (file)
@@ -7,15 +7,10 @@
  */
 package org.opendaylight.controller.config.yang.md.sal.binding.impl;
 
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-
 import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
 import org.opendaylight.controller.sal.binding.impl.NotificationBrokerImpl;
 
 import com.google.common.util.concurrent.ListeningExecutorService;
-import com.google.common.util.concurrent.MoreExecutors;
 
 /**
 *
index 583591615c1089fb6741db79e68ab3eef3531bce..0762739c636eaff397371f7bd6b01ef223300099 100644 (file)
@@ -11,8 +11,6 @@ import java.util.Hashtable;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import javassist.ClassPool;
-
 import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
 import org.opendaylight.yangtools.concepts.Delegator;
 import org.opendaylight.yangtools.sal.binding.generator.impl.RuntimeGeneratedMappingServiceImpl;
@@ -115,39 +113,47 @@ public final class RuntimeMappingModule extends
             this.delegate = Preconditions.checkNotNull(delegate);
         }
 
+        @Override
         public CodecRegistry getCodecRegistry() {
             return delegate.getCodecRegistry();
         }
 
+        @Override
         public CompositeNode toDataDom(DataObject data) {
             return delegate.toDataDom(data);
         }
 
+        @Override
         public Entry<InstanceIdentifier, CompositeNode> toDataDom(
                 Entry<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<? extends DataObject>, DataObject> entry) {
             return delegate.toDataDom(entry);
         }
 
+        @Override
         public InstanceIdentifier toDataDom(
                 org.opendaylight.yangtools.yang.binding.InstanceIdentifier<? extends DataObject> path) {
             return delegate.toDataDom(path);
         }
 
+        @Override
         public DataObject dataObjectFromDataDom(
                 org.opendaylight.yangtools.yang.binding.InstanceIdentifier<? extends DataObject> path,
                 CompositeNode result) throws DeserializationException {
             return delegate.dataObjectFromDataDom(path, result);
         }
 
+        @Override
         public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> fromDataDom(InstanceIdentifier entry)
                 throws DeserializationException {
             return delegate.fromDataDom(entry);
         }
 
+        @Override
         public Set<QName> getRpcQNamesFor(Class<? extends RpcService> service) {
             return delegate.getRpcQNamesFor(service);
         }
 
+        @Override
         public DataContainer dataObjectFromDataDom(Class<? extends DataContainer> inputClass, CompositeNode domInput) {
             return delegate.dataObjectFromDataDom(inputClass, domInput);
         }
index 4f994e5673a2c80896d8c5168af4d0c299ee7bcf..5578f75ae21d6800cf2c73661afa15a071bd6ef8 100644 (file)
@@ -7,29 +7,26 @@
  */
 package org.opendaylight.controller.sal.binding.codegen.impl;
 
-import org.opendaylight.yangtools.yang.binding.RpcService;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
-import org.opendaylight.controller.sal.binding.api.rpc.RpcRouter;
-import org.opendaylight.controller.sal.binding.api.rpc.RpcRoutingTable;
-import org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper;
-import org.opendaylight.yangtools.yang.binding.BaseIdentity;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-import static org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper.*;
+import static org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper.setRoutingTable;
 
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
-import java.util.HashMap;
 
-import org.opendaylight.yangtools.yang.binding.DataContainer;
-import org.opendaylight.yangtools.yang.binding.RpcImplementation;
-import org.opendaylight.controller.md.sal.common.api.routing.MutableRoutingTable;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChange;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
+import org.opendaylight.controller.sal.binding.api.rpc.RpcRouter;
+import org.opendaylight.controller.sal.binding.api.rpc.RpcRoutingTable;
+import org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper;
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.util.ListenerRegistry;
+import org.opendaylight.yangtools.yang.binding.BaseIdentity;
+import org.opendaylight.yangtools.yang.binding.DataContainer;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -66,11 +63,11 @@ public class RpcRouterCodegenInstance<T extends RpcService> implements //
         Map<Class<? extends BaseIdentity>, RpcRoutingTableImpl<? extends BaseIdentity, T>> mutableRoutingTables = new HashMap<>();
         for (Class<? extends BaseIdentity> ctx : contexts) {
             RpcRoutingTableImpl<? extends BaseIdentity, T> table = new RpcRoutingTableImpl<>(name,ctx,type);
-            
+
             @SuppressWarnings("rawtypes")
             Map invokerView = table.getRoutes();
-            
-            setRoutingTable((RpcService) invocationProxy, ctx, invokerView);
+
+            setRoutingTable(invocationProxy, ctx, invokerView);
             mutableRoutingTables.put(ctx, table);
             table.registerRouteChangeListener(this);
         }
index 500b1b399e8f38d5d51aa9b70ec14fc76ddd33cb..ce159b8f3ed0974b9e47300e1b0aa8a935596e3a 100644 (file)
@@ -7,24 +7,21 @@
  */
 package org.opendaylight.controller.sal.binding.codegen.impl;
 
-import org.opendaylight.controller.sal.binding.api.rpc.RpcRoutingTable;
-import org.opendaylight.yangtools.yang.binding.BaseIdentity;
-import org.opendaylight.yangtools.yang.binding.RpcService;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
 import java.util.Collections;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublisher;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
+import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublisher;
 import org.opendaylight.controller.md.sal.common.impl.routing.RoutingUtils;
+import org.opendaylight.controller.sal.binding.api.rpc.RpcRoutingTable;
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
-import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.Mutable;
+import org.opendaylight.yangtools.yang.binding.BaseIdentity;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -44,7 +41,7 @@ implements //
 
     private RouteChangeListener<Class<? extends BaseIdentity>, InstanceIdentifier<?>> listener;
     private S defaultRoute;
-    
+
     public RpcRoutingTableImpl(String routerName,Class<C> contextType, Class<S> serviceType) {
         super();
         this.routerName = routerName;
@@ -67,9 +64,9 @@ implements //
     @Override
     public <L extends RouteChangeListener<Class<? extends BaseIdentity>, InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(
             L listener) {
-        return (ListenerRegistration<L>) new SingletonListenerRegistration<L>(listener);
+        return new SingletonListenerRegistration<L>(listener);
     }
-        
+
     @Override
     public Class<C> getIdentifier() {
         return contextType;
@@ -79,7 +76,7 @@ implements //
     @SuppressWarnings("unchecked")
     public void updateRoute(InstanceIdentifier<?> path, S service) {
         S previous = this.routes.put(path, service);
-        
+
         LOGGER.debug("Route {} updated to {} in routing table {}",path,service,this);
         @SuppressWarnings("rawtypes")
         RouteChangeListener listenerCapture = listener;
@@ -88,7 +85,7 @@ implements //
         }
     }
 
-    
+
     @Override
     @SuppressWarnings("unchecked")
     public void removeRoute(InstanceIdentifier<?> path) {
@@ -100,7 +97,7 @@ implements //
             listenerCapture.onRouteChange(RoutingUtils.removalChange(contextType, path));
         }
     }
-    
+
     public void removeRoute(InstanceIdentifier<?> path, S service) {
         @SuppressWarnings("rawtypes")
         RouteChangeListener listenerCapture = listener;
@@ -123,12 +120,12 @@ implements //
     public Map<InstanceIdentifier<?>, S> getRoutes() {
         return unmodifiableRoutes;
     }
-    
+
     protected void removeAllReferences(S service) {
-        
+
     }
-    
-    
+
+
 
     @Override
     public String toString() {
index 244e3503439612fb7211dd9307c191e73f048120..291677a79a4fba3a16d27e1929e1fd23e2e14743 100644 (file)
@@ -9,9 +9,10 @@ package org.opendaylight.controller.sal.binding.codegen.impl;
 
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ThreadFactory;
 
+import javassist.ClassPool;
+
 import org.opendaylight.controller.sal.binding.codegen.RuntimeCodeGenerator;
 import org.opendaylight.controller.sal.binding.spi.NotificationInvokerFactory;
 
@@ -19,8 +20,6 @@ import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 
-import javassist.ClassPool;
-
 public class SingletonHolder {
 
     public static final ClassPool CLASS_POOL = new ClassPool();
index 3cc66c30c10e490d1b652f6357d9b1ef308be3d2..ddf67719dc03f8c9311f565fbf78c98f8ba107cd 100644 (file)
@@ -8,19 +8,18 @@
 package org.opendaylight.controller.sal.binding.impl;\r
 \r
 import java.util.Set;
-import java.util.concurrent.Future;\r
-import java.util.concurrent.atomic.AtomicLong;\r
-\r
-import org.opendaylight.controller.md.sal.common.impl.service.AbstractDataBroker;\r
-import org.opendaylight.controller.sal.binding.api.data.DataChangeListener;\r
-import org.opendaylight.controller.sal.binding.api.data.DataProviderService;\r
-import org.opendaylight.controller.sal.binding.impl.util.BindingAwareDataReaderRouter;\r
-import org.opendaylight.controller.sal.common.DataStoreIdentifier;\r
-import org.opendaylight.yangtools.yang.binding.DataObject;\r
-import org.opendaylight.yangtools.yang.binding.DataRoot;\r
-import org.opendaylight.yangtools.yang.binding.Identifiable;\r
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;\r
-import org.opendaylight.yangtools.yang.common.RpcResult;\r
+import java.util.concurrent.Future;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.opendaylight.controller.md.sal.common.impl.service.AbstractDataBroker;
+import org.opendaylight.controller.sal.binding.api.data.DataChangeListener;
+import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
+import org.opendaylight.controller.sal.binding.impl.util.BindingAwareDataReaderRouter;
+import org.opendaylight.controller.sal.common.DataStoreIdentifier;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.DataRoot;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.RpcResult;
 \r
 \r
 public class DataBrokerImpl extends AbstractDataBroker<InstanceIdentifier<? extends DataObject>, DataObject, DataChangeListener> //\r
@@ -28,7 +27,7 @@ public class DataBrokerImpl extends AbstractDataBroker<InstanceIdentifier<? exte
 \r
     private final AtomicLong nextTransaction = new AtomicLong();\r
     private final AtomicLong createdTransactionsCount = new AtomicLong();\r
-    \r
+\r
     public AtomicLong getCreatedTransactionsCount() {\r
         return createdTransactionsCount;\r
     }\r
@@ -104,13 +103,12 @@ public class DataBrokerImpl extends AbstractDataBroker<InstanceIdentifier<? exte
             DataChangeListener changeListener) {\r
         throw new UnsupportedOperationException("Deprecated");\r
     }\r
-    \r
+\r
     @Override\r
     public void close() throws Exception {\r
-        \r
+\r
     }
-    
-    
+
     @Override
     protected boolean isAffectedBy(InstanceIdentifier<? extends DataObject> key,
             Set<InstanceIdentifier<? extends DataObject>> paths) {
index 290ff2232f4f50236980486197eded7f52cfefea..1ea2eba87f932a565a7d537b8c41725c6ecfa8b8 100644 (file)
@@ -10,18 +10,17 @@ package org.opendaylight.controller.sal.binding.impl;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.md.sal.common.impl.service.AbstractDataTransaction;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
-import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction.DataTransactionListener;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.util.ListenerRegistry;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public class DataTransactionImpl extends AbstractDataTransaction<InstanceIdentifier<? extends DataObject>, DataObject> 
+public class DataTransactionImpl extends AbstractDataTransaction<InstanceIdentifier<? extends DataObject>, DataObject>
     implements DataModificationTransaction {
     private final ListenerRegistry<DataTransactionListener> listeners = new ListenerRegistry<DataTransactionListener>();
-    
-    
-    
+
+
+
     public DataTransactionImpl(Object identifier,DataBrokerImpl dataBroker) {
         super(identifier,dataBroker);
     }
@@ -31,6 +30,7 @@ public class DataTransactionImpl extends AbstractDataTransaction<InstanceIdentif
         return listeners.register(listener);
     }
 
+    @Override
     protected void onStatusChange(TransactionStatus status) {
         for (ListenerRegistration<DataTransactionListener> listenerRegistration : listeners) {
             listenerRegistration.getInstance().onStatusUpdated(this, status);
index f93457110181967063ec64c27a3f29c026320121..a5da8a0cb14a329e6e22b1129f560db1c6de27c2 100644 (file)
@@ -7,29 +7,28 @@
  */
 package org.opendaylight.controller.sal.binding.impl;
 
+import static com.google.common.base.Preconditions.checkState;
+
 import java.util.EventListener;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.HashMap;
 import java.util.Set;
 import java.util.WeakHashMap;
 
-import javax.swing.tree.ExpandVetoException;
-
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChange;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublisher;
 import org.opendaylight.controller.md.sal.common.impl.routing.RoutingUtils;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcRouter;
 import org.opendaylight.controller.sal.binding.codegen.RuntimeCodeGenerator;
 import org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper;
 import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
-import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
-import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.util.ListenerRegistry;
 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
@@ -38,8 +37,6 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static com.google.common.base.Preconditions.*;
-
 public class RpcProviderRegistryImpl implements //
         RpcProviderRegistry, //
         RouteChangePublisher<RpcContextIdentifier, InstanceIdentifier<?>> {
@@ -56,7 +53,7 @@ public class RpcProviderRegistryImpl implements //
 
     private final String name;
 
-    private ListenerRegistry<GlobalRpcRegistrationListener> globalRpcListeners = ListenerRegistry.create();
+    private final ListenerRegistry<GlobalRpcRegistrationListener> globalRpcListeners = ListenerRegistry.create();
 
     public String getName() {
         return name;
@@ -109,7 +106,7 @@ public class RpcProviderRegistryImpl implements //
 
             potentialProxy = (T) publicProxies.get(type);
             if (potentialProxy != null) {
-                return (T) potentialProxy;
+                return potentialProxy;
             }
             T proxy = rpcFactory.getDirectProxyFor(type);
             LOG.debug("Created {} as public proxy for {} in {}", proxy, type.getSimpleName(), this);
@@ -151,7 +148,7 @@ public class RpcProviderRegistryImpl implements //
                 LOG.error("Unhandled exception during invoking listener {}", e);
             }
         }
-        
+
     }
 
     private void notifyListenersRoutedCreated(RpcRouter router) {
@@ -196,7 +193,7 @@ public class RpcProviderRegistryImpl implements //
     public interface RouterInstantiationListener extends EventListener {
         void onRpcRouterCreated(RpcRouter<?> router);
     }
-    
+
     public ListenerRegistration<GlobalRpcRegistrationListener> registerGlobalRpcRegistrationListener(GlobalRpcRegistrationListener listener) {
         return globalRpcListeners.register(listener);
     }
@@ -204,7 +201,7 @@ public class RpcProviderRegistryImpl implements //
     public interface GlobalRpcRegistrationListener extends EventListener {
         void onGlobalRpcRegistered(Class<? extends RpcService> cls);
         void onGlobalRpcUnregistered(Class<? extends RpcService> cls);
-        
+
     }
 
     private class RouteChangeForwarder<T extends RpcService> implements
index e89797ca2daa2f8267ffeedb7e0f7fecb976d321..8278b365518e2cd62ee400fe14693e7b18cef96a 100644 (file)
@@ -13,19 +13,13 @@ import java.util.concurrent.ConcurrentMap;
 import org.opendaylight.controller.md.sal.common.api.data.DataModification;
 import org.opendaylight.yangtools.concepts.Path;
 
-import com.google.common.util.concurrent.JdkFutureAdapters;
-
 public final class DataModificationTracker<P extends Path<P>,D> {
-
     ConcurrentMap<Object, DataModification<P,D>> trackedTransactions = new ConcurrentHashMap<>();
-    
-    
+
     public void startTrackingModification(DataModification<P,D> modification) {
         trackedTransactions.putIfAbsent(modification.getIdentifier(), modification);
-        
-        
     }
-    
+
     public boolean containsIdentifier(Object identifier) {
         return trackedTransactions.containsKey(identifier);
     }
index 7c38ff2731805d0bf57dc590d588f863da7a307b..6c80f4d7394947cd34af1aa3eedb305dc2f99113 100644 (file)
@@ -10,12 +10,11 @@ package org.opendaylight.controller.sal.binding.test;
 import org.junit.After;
 import org.junit.Before;
 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
-import org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService;
 import org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory;
 import org.opendaylight.controller.sal.binding.test.util.BindingTestContext;
 import org.opendaylight.controller.sal.core.api.data.DataStore;
 import org.opendaylight.controller.sal.dom.broker.impl.DataStoreStatsWrapper;
-import org.opendaylight.controller.sal.dom.broker.impl.HashMapDataStore;
+import org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 76abd833e9337bba87595956f0d4f82993009d61..4afbc298426e943810f8149a0d17a20ae9e93210 100644 (file)
@@ -7,22 +7,20 @@
  */
 package org.opendaylight.controller.sal.binding.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import javassist.ClassPool;
 
 import org.junit.Before;
 import org.junit.Test;
-
-import static org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper.*;
-
-import org.opendaylight.controller.sal.binding.api.NotificationListener;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcRouter;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcRoutingTable;
 import org.opendaylight.controller.sal.binding.codegen.impl.RuntimeCodeGenerator;
@@ -30,12 +28,10 @@ import org.opendaylight.controller.sal.binding.spi.NotificationInvokerFactory;
 import org.opendaylight.controller.sal.binding.spi.NotificationInvokerFactory.NotificationInvoker;
 import org.opendaylight.controller.sal.binding.test.mock.BarListener;
 import org.opendaylight.controller.sal.binding.test.mock.BarUpdate;
-import org.opendaylight.controller.sal.binding.test.mock.CompositeListener;
 import org.opendaylight.controller.sal.binding.test.mock.FlowDelete;
 import org.opendaylight.controller.sal.binding.test.mock.FooListener;
 import org.opendaylight.controller.sal.binding.test.mock.FooService;
 import org.opendaylight.controller.sal.binding.test.mock.FooUpdate;
-import org.opendaylight.controller.sal.binding.test.mock.InheritedContextInput;
 import org.opendaylight.controller.sal.binding.test.mock.ReferencableObject;
 import org.opendaylight.controller.sal.binding.test.mock.ReferencableObjectKey;
 import org.opendaylight.controller.sal.binding.test.mock.SimpleInput;
@@ -47,8 +43,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.IdentifiableItem;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 
-import static org.mockito.Mockito.*;
-
 public class RuntimeCodeGeneratorTest {
 
     private RuntimeCodeGenerator codeGenerator;
@@ -84,7 +78,7 @@ public class RuntimeCodeGeneratorTest {
 
         NotificationInvoker invokerFoo = invokerFactory.invokerFor(fooListener);
 
-        
+
         assertSame(fooListener,invokerFoo.getDelegate());
         assertNotNull(invokerFoo.getSupportedNotifications());
         assertEquals(1, invokerFoo.getSupportedNotifications().size());
index 2b0865ae46e0f01045bf4037a06988a77a057158..e5b57e3668baadb6fbe942364bfb3d920f56772c 100644 (file)
@@ -11,11 +11,6 @@ import java.util.concurrent.ExecutorService;
 
 import javassist.ClassPool;
 
-import org.opendaylight.controller.sal.core.api.data.DataStore;
-import org.opendaylight.controller.sal.dom.broker.impl.DataStoreStatsWrapper;
-import org.opendaylight.controller.sal.dom.broker.impl.HashMapDataStore;
-import org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter;
-
 import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
@@ -27,7 +22,7 @@ public class BindingBrokerTestFactory {
     private ExecutorService executor;
     private ClassPool classPool;
 
-    
+
     public boolean isStartWithParsedSchema() {
         return startWithParsedSchema;
     }
@@ -55,7 +50,7 @@ public class BindingBrokerTestFactory {
         if(classPool == null) {
             return CLASS_POOL;
         }
-        
+
         return classPool;
     }
 
index 0c562f5d3344f58b1ea9ff9426c5c701632a8502..77b411002b01e480bca055c7507ef59c0915d834 100644 (file)
@@ -8,20 +8,14 @@
 package org.opendaylight.controller.md.sal.binding.util;
 
 import java.util.concurrent.Future;
-import java.util.zip.Checksum;
 
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
 import org.opendaylight.controller.sal.binding.api.NotificationListener;
 import org.opendaylight.controller.sal.binding.api.NotificationService;
 import org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
 import org.opendaylight.controller.sal.binding.api.data.DataChangeListener;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
-import org.opendaylight.controller.sal.binding.api.mount.MountInstance;
 import org.opendaylight.controller.sal.common.DataStoreIdentifier;
-import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -54,7 +48,7 @@ public abstract class AbstractBindingSalConsumerInstance<D extends DataBrokerSer
     protected final D getDataBroker() {
         return dataBroker;
     }
-    
+
     protected final R getRpcRegistryChecked() {
         Preconditions.checkState(rpcRegistry != null,"Rpc Registry is not available.");
         return rpcRegistry;
@@ -69,7 +63,7 @@ public abstract class AbstractBindingSalConsumerInstance<D extends DataBrokerSer
         Preconditions.checkState(dataBroker != null, "Data Broker is not available");
         return dataBroker;
     }
-    
+
 
     protected AbstractBindingSalConsumerInstance(R rpcRegistry, N notificationBroker, D dataBroker) {
         this.rpcRegistry = rpcRegistry;
@@ -77,106 +71,127 @@ public abstract class AbstractBindingSalConsumerInstance<D extends DataBrokerSer
         this.dataBroker = dataBroker;
     }
 
+    @Override
     public <T extends RpcService> T getRpcService(Class<T> module) {
         return getRpcRegistryChecked().getRpcService(module);
     }
 
+    @Override
     @Deprecated
     public <T extends Notification> void addNotificationListener(Class<T> notificationType,
             NotificationListener<T> listener) {
         getNotificationBrokerChecked().addNotificationListener(notificationType, listener);
     }
 
+    @Override
     @Deprecated
     public void addNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener listener) {
         getNotificationBrokerChecked().addNotificationListener(listener);
     }
 
+    @Override
     @Deprecated
     public void removeNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener listener) {
         getNotificationBrokerChecked().removeNotificationListener(listener);
     }
 
+    @Override
     @Deprecated
     public <T extends Notification> void removeNotificationListener(Class<T> notificationType,
             NotificationListener<T> listener) {
         getNotificationBrokerChecked().removeNotificationListener(notificationType, listener);
     }
 
+    @Override
     public <T extends Notification> Registration<NotificationListener<T>> registerNotificationListener(
             Class<T> notificationType, NotificationListener<T> listener) {
         return getNotificationBrokerChecked().registerNotificationListener(notificationType, listener);
     }
 
+    @Override
     public Registration<org.opendaylight.yangtools.yang.binding.NotificationListener> registerNotificationListener(
             org.opendaylight.yangtools.yang.binding.NotificationListener listener) {
         return getNotificationBrokerChecked().registerNotificationListener(listener);
     }
 
+    @Override
     @Deprecated
     public <T extends DataRoot> T getData(DataStoreIdentifier store, Class<T> rootType) {
         return getDataBrokerChecked().getData(store, rootType);
     }
 
+    @Override
     @Deprecated
     public <T extends DataRoot> T getData(DataStoreIdentifier store, T filter) {
         return getDataBrokerChecked().getData(store, filter);
     }
 
+    @Override
     @Deprecated
     public <T extends DataRoot> T getCandidateData(DataStoreIdentifier store, Class<T> rootType) {
         return getDataBrokerChecked().getCandidateData(store, rootType);
     }
 
+    @Override
     @Deprecated
     public <T extends DataRoot> T getCandidateData(DataStoreIdentifier store, T filter) {
         return getDataBrokerChecked().getCandidateData(store, filter);
     }
 
+    @Override
     @Deprecated
     public RpcResult<DataRoot> editCandidateData(DataStoreIdentifier store, DataRoot changeSet) {
         return getDataBrokerChecked().editCandidateData(store, changeSet);
     }
 
+    @Override
     @Deprecated
     public Future<RpcResult<Void>> commit(DataStoreIdentifier store) {
         return getDataBrokerChecked().commit(store);
     }
 
+    @Override
     @Deprecated
     public DataObject getData(InstanceIdentifier<? extends DataObject> data) {
         return getDataBrokerChecked().getData(data);
     }
 
+    @Override
     @Deprecated
     public DataObject getConfigurationData(InstanceIdentifier<?> data) {
         return getDataBrokerChecked().getConfigurationData(data);
     }
 
+    @Override
     public DataModificationTransaction beginTransaction() {
         return getDataBrokerChecked().beginTransaction();
     }
 
+    @Override
     @Deprecated
     public void registerChangeListener(InstanceIdentifier<? extends DataObject> path, DataChangeListener changeListener) {
         getDataBrokerChecked().registerChangeListener(path, changeListener);
     }
 
+    @Override
     @Deprecated
     public void unregisterChangeListener(InstanceIdentifier<? extends DataObject> path,
             DataChangeListener changeListener) {
         getDataBrokerChecked().unregisterChangeListener(path, changeListener);
     }
 
+    @Override
     @Deprecated
     public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path) {
         return getDataBrokerChecked().readConfigurationData(path);
     }
 
+    @Override
     public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path) {
         return getDataBrokerChecked().readOperationalData(path);
     }
 
+    @Override
     @Deprecated
     public ListenerRegistration<DataChangeListener> registerDataChangeListener(
             InstanceIdentifier<? extends DataObject> path, DataChangeListener listener) {
index c7d6640ce1eb6c53df124c5338290519f4843e14..efa02e0b301303d9a3444771f15afe4df64d1ec0 100644 (file)
@@ -19,7 +19,6 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistr
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
-import org.opendaylight.controller.sal.binding.api.mount.MountProviderInstance;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.Registration;
@@ -99,7 +98,7 @@ public abstract class AbstractBindingSalProviderInstance<D extends DataProviderS
             L listener) {
         return getRpcRegistryChecked().registerRouteChangeListener(listener);
     }
-    
+
     @Override
     public ListenerRegistration<NotificationInterestListener> registerInterestListener(
             NotificationInterestListener interestListener) {
index d164f82222bb50781ca854b2c5a661791468c1a6..dc22891b471dc2aaa623f096e21395099f0d7328 100644 (file)
@@ -7,26 +7,24 @@
  */
 package org.opendaylight.controller.md.sal.binding.util;
 
-import java.awt.image.SinglePixelPackedSampleModel;
+import static com.google.common.base.Preconditions.checkNotNull;
 
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
+import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality;
-import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
-import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer;
 import org.opendaylight.controller.sal.binding.api.BindingAwareService;
 import org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
-import static com.google.common.base.Preconditions.*;
-
 import com.google.common.collect.ClassToInstanceMap;
 import com.google.common.collect.MutableClassToInstanceMap;
 
@@ -38,7 +36,7 @@ public class BindingContextUtils {
         checkNotNull(serviceProvider,"Service map should not be null");
         return new SingleConsumerContextImpl(serviceProvider);
     }
-    
+
     public static ProviderContext createProviderContext(BindingAwareProvider provider,
             ClassToInstanceMap<BindingAwareService> serviceProvider) {
         checkNotNull(provider,"Provider should not be null");
@@ -52,7 +50,7 @@ public class BindingContextUtils {
         consumer.onSessionInitialized(context);
         return context;
     }
-    
+
     public static ProviderContext createProviderContextAndInitialize(BindingAwareProvider provider,
             ClassToInstanceMap<BindingAwareService> serviceProvider) {
         ProviderContext context = createProviderContext(provider, serviceProvider);
@@ -64,9 +62,9 @@ public class BindingContextUtils {
         // FIXME: Create Proxy
         return instance;
     }
-    
+
     private static class SingleConsumerContextImpl implements ConsumerContext, AutoCloseable {
-        
+
         private ClassToInstanceMap<BindingAwareService> alreadyRetrievedServices;
         private ClassToInstanceMap<BindingAwareService> serviceProvider;
 
@@ -79,7 +77,7 @@ public class BindingContextUtils {
         public final <T extends RpcService> T getRpcService(Class<T> module) {
             return getSALService(RpcConsumerRegistry.class).getRpcService(module);
         }
-        
+
         @Override
         public final <T extends BindingAwareService> T getSALService(Class<T> service) {
             checkNotNull(service,"Service class should not be null.");
@@ -89,7 +87,7 @@ public class BindingContextUtils {
             }
             return tryToRetrieveSalService(service);
         }
-        
+
         private synchronized <T extends BindingAwareService> T tryToRetrieveSalService(Class<T> service) {
             final T potential = alreadyRetrievedServices.getInstance(service);
             if(potential != null) {
@@ -103,44 +101,44 @@ public class BindingContextUtils {
             alreadyRetrievedServices.put(service, retrieved);
             return retrieved;
         }
-        
+
         @Override
         public final void close() throws Exception {
             alreadyRetrievedServices = null;
             serviceProvider = null;
         }
     }
-    
+
     private static class SingleProviderContextImpl extends SingleConsumerContextImpl implements ProviderContext {
 
         public SingleProviderContextImpl(ClassToInstanceMap<BindingAwareService> serviceProvider) {
             super(serviceProvider);
         }
-        
+
         @Override
         public <L extends RouteChangeListener<RpcContextIdentifier, InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(
                 L listener) {
             return getSALService(RpcProviderRegistry.class).registerRouteChangeListener(listener);
         }
-        
+
         @Override
         public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type,
                 T implementation) throws IllegalStateException {
             return getSALService(RpcProviderRegistry.class).addRoutedRpcImplementation(type, implementation);
         }
-        
+
         @Override
         public <T extends RpcService> RpcRegistration<T> addRpcImplementation(Class<T> type, T implementation)
                 throws IllegalStateException {
             return getSALService(RpcProviderRegistry.class).addRpcImplementation(type, implementation);
         }
-        
+
         @Deprecated
         @Override
         public void registerFunctionality(ProviderFunctionality functionality) {
             // NOOP
         }
-        
+
         @Deprecated
         @Override
         public void unregisterFunctionality(ProviderFunctionality functionality) {
index 1700411df8072c3f3ca331661323a1aedf971312..66645e5538d6efb0935231100c0a72890ed09a70 100644 (file)
@@ -9,10 +9,9 @@ package org.opendaylight.controller.md.sal.common.api.data;
 
 
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
+
 // FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
 // import org.opendaylight.yangtools.concepts.Path;
-import org.opendaylight.yangtools.concepts.Registration;
-
 public interface DataChangePublisher<P/* extends Path<P> */,D, L extends DataChangeListener<P,D>> {
 
     ListenerRegistration<L> registerDataChangeListener(P path, L listener);
index 29ba192ba821294ceff36aa8de3b83a445edce16..00db6064aa3bb54fa2a1f123be45d67289e63c52 100644 (file)
@@ -7,20 +7,18 @@
  */
 package org.opendaylight.controller.md.sal.common.api.data;
 
-import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.Future;
 
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
-// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
-// import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
+//FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
+//import org.opendaylight.yangtools.concepts.Path;
 public interface DataModification<P/* extends Path<P> */, D> extends DataChange<P, D>, DataReader<P, D> {
 
     /**
      * Returns transaction identifier
-     * 
+     *
      * @return Transaction identifier
      */
     Object getIdentifier();
@@ -28,9 +26,9 @@ public interface DataModification<P/* extends Path<P> */, D> extends DataChange<
     TransactionStatus getStatus();
 
     /**
-     * 
+     *
      * @deprecated Use {@link #putOperationalData(Object, Object)} instead.
-     * 
+     *
      * @param path
      * @param data
      */
@@ -81,7 +79,7 @@ public interface DataModification<P/* extends Path<P> */, D> extends DataChange<
 
     /**
      * @deprecated Use {@link #removeOperationalData(Object)}
-     * 
+     *
      * @param path
      */
     @Deprecated
@@ -93,18 +91,18 @@ public interface DataModification<P/* extends Path<P> */, D> extends DataChange<
 
     /**
      * Initiates a two-phase commit of modification.
-     * 
+     *
      * <p>
      * The successful commit changes the state of the system and may affect
      * several components.
-     * 
+     *
      * <p>
      * The effects of successful commit of data are described in the
      * specifications and YANG models describing the Provider components of
      * controller. It is assumed that Consumer has an understanding of this
      * changes.
-     * 
-     * 
+     *
+     *
      * @see DataCommitHandler for further information how two-phase commit is
      *      processed.
      * @param store
index fed75f72bee5229beb26ddc3fe88e257749d8137..f337b5509e1a4cda6d4c1488bef048be5d8adeef 100644 (file)
@@ -7,13 +7,12 @@
  */
 package org.opendaylight.controller.md.sal.common.impl;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 import java.util.Collections;
 import java.util.EventListener;
 import java.util.HashSet;
 import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import static com.google.common.base.Preconditions.*;
 
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -32,15 +31,15 @@ public class ListenerRegistry<T extends EventListener> {
         return unmodifiableView;
     }
 
-    
+
     public ListenerRegistration<T> register(T listener) {
         checkNotNull(listener, "Listener should not be null.");
         ListenerRegistrationImpl<T> ret = new ListenerRegistrationImpl<T>(listener);
         listeners.add(ret);
         return ret;
     }
-    
-    
+
+
     @SuppressWarnings("rawtypes")
     private void remove(ListenerRegistrationImpl registration) {
         listeners.remove(registration);
index bd9748d3c57814184a6adf36f03102c6bbde56af..4d756f1d67380851c726a41a321a1e53ff7c8993 100644 (file)
@@ -8,8 +8,6 @@
 package org.opendaylight.controller.md.sal.common.impl.util;
 
 import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
@@ -23,8 +21,8 @@ public class AbstractLockableDelegator<T> implements Delegator<T> {
     private final ReentrantReadWriteLock delegateLock = new ReentrantReadWriteLock();
     private final ReadLock delegateReadLock = delegateLock.readLock();
     private final WriteLock delegateWriteLock = delegateLock.writeLock();
-    
-    
+
+
     protected Lock getDelegateReadLock() {
         return delegateReadLock;
     }
@@ -60,7 +58,7 @@ public class AbstractLockableDelegator<T> implements Delegator<T> {
     }
 
     /**
-     * 
+     *
      * @param newDelegate
      * @return oldDelegate
      */
@@ -75,8 +73,8 @@ public class AbstractLockableDelegator<T> implements Delegator<T> {
             delegateWriteLock.unlock();
         }
     }
-    
-    
+
+
     protected void onDelegateChanged(T oldDelegate, T newDelegate) {
         // NOOP in abstract calss;
     }
index 356ec8ff7c5ee6e84692970d702910b7bdc8c091..f7fc7140251e00eeda5eea904c97074278d15960 100644 (file)
@@ -8,9 +8,7 @@
 package org.opendaylight.controller.sal.common.util;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.common.RpcError;
@@ -19,12 +17,12 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import com.google.common.collect.ImmutableList;
 
 public class Rpcs {
-    
+
     public static <T> RpcResult<T> getRpcResult(boolean successful) {
         RpcResult<T> ret = new RpcResultTO<T>(successful, null, ImmutableList.<RpcError>of());
         return ret;
     }
-    
+
     public static <T> RpcResult<T> getRpcResult(boolean successful, T result,
             Collection<RpcError> errors) {
         RpcResult<T> ret = new RpcResultTO<T>(successful, result, errors);
@@ -34,7 +32,7 @@ public class Rpcs {
     public static <T> RpcResult<T> getRpcResult(boolean successful, Collection<RpcError> errors) {
         return new RpcResultTO<T>(successful, null, errors);
     }
-    
+
     private static class RpcResultTO<T> implements RpcResult<T>, Serializable, Immutable {
 
         private final Collection<RpcError> errors;
index 1cb1a2bc8522b65301e3f70470e2c41e06d3b32c..22b0bf25cf9b65958131ace905b0176d351f4147 100644 (file)
@@ -10,9 +10,6 @@ package org.opendaylight.controller.sal.core.api;
 import java.util.Collection;
 import java.util.Collections;
 
-import javax.naming.Context;
-
-import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -59,18 +56,18 @@ public abstract class AbstractProvider implements BundleActivator, Provider,Serv
             broker.registerProvider(this, context);
             return broker;
         }
-        
+
         return null;
     }
-    
+
     @Override
     public void modifiedService(ServiceReference<Broker> reference, Broker service) {
         // NOOP
     }
-    
+
     @Override
     public void removedService(ServiceReference<Broker> reference, Broker service) {
         stopImpl(context);
     }
-    
+
 }
index 774de271af32878a8b8d3e6dc70070c6a300f308..9706bbacdbdbee3b22c3a8b163b069617b452347 100644 (file)
@@ -8,8 +8,6 @@
 package org.opendaylight.controller.sal.core.api.data;
 
 import java.util.EventListener;
-import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.Future;
 
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
@@ -23,31 +21,28 @@ public interface DataModificationTransaction extends DataModification<InstanceId
 
     /**
      * Returns transaction identifier
-     * 
+     *
      * @return Transaction identifier
      */
+    @Override
     Object getIdentifier();
-    
+
+    @Override
     TransactionStatus getStatus();
-    
+
     /**
      * Commits transaction to be stored in global data repository.
-     * 
-     * 
-     * @return  Future object which returns RpcResult with TransactionStatus 
+     *
+     *
+     * @return  Future object which returns RpcResult with TransactionStatus
      *          when transaction is processed by store.
      */
+    @Override
     Future<RpcResult<TransactionStatus>> commit();
-    
+
     ListenerRegistration<DataTransactionListener> registerListener(DataTransactionListener listener);
-    
-    
+
     public interface DataTransactionListener extends EventListener {
-        
         void onStatusUpdated(DataModificationTransaction transaction,TransactionStatus status);
-        
     }
-    
-    
-    
 }
index 299fe1b55811495adee6c66d880cb7badc063152..29e3b911c1d1b1d8a5cdf64b30da0842bff7d11f 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.sal.core.api.mount;
 import org.opendaylight.controller.sal.core.api.RpcProvisionRegistry;
 import org.opendaylight.controller.sal.core.api.data.DataProviderService;
 import org.opendaylight.controller.sal.core.api.notify.NotificationPublishService;
-import com.google.common.base.Optional;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public interface MountProvisionInstance extends //
index 403f7c8da0e99cdcc0c21aa841849701bc478edf..bbe017f009e445f2ab7e21e7d19b748d3f5365f0 100644 (file)
@@ -9,14 +9,13 @@ package org.opendaylight.controller.sal.dom.broker;
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import org.opendaylight.controller.sal.core.api.BrokerService;
 import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
 import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
+import org.opendaylight.controller.sal.core.api.BrokerService;
 import org.opendaylight.controller.sal.core.api.Consumer.ConsumerFunctionality;
 import org.opendaylight.controller.sal.core.api.Provider.ProviderFunctionality;
 import org.opendaylight.controller.sal.core.api.notify.NotificationListener;
@@ -37,7 +36,7 @@ public class NotificationModule implements BrokerModule {
     private static Logger log = LoggerFactory
             .getLogger(NotificationModule.class);
 
-    private Multimap<QName, NotificationListener> listeners = HashMultimap
+    private final Multimap<QName, NotificationListener> listeners = HashMultimap
             .create();
 
     private static final Set<Class<? extends BrokerService>> PROVIDED_SERVICE_TYPE = ImmutableSet
@@ -114,11 +113,12 @@ public class NotificationModule implements BrokerModule {
     private class NotificationConsumerSessionImpl implements
             NotificationService {
 
-        private Multimap<QName, NotificationListener> consumerListeners = HashMultimap
+        private final Multimap<QName, NotificationListener> consumerListeners = HashMultimap
                 .create();
         private boolean closed = false;
 
 
+        @Override
         public Registration<NotificationListener> addNotificationListener(QName notification,
                 NotificationListener listener) {
             checkSessionState();
index 0b184fc86ec0720193210bd8b0a997235caddca8..50af3fbfc1f097662ae4f0a8f1e1084cb87aab96 100644 (file)
@@ -8,21 +8,8 @@
 package org.opendaylight.controller.sal.dom.broker.impl;
 
 import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
 
-import org.opendaylight.controller.sal.core.api.BrokerService;
-import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
-import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
-import org.opendaylight.controller.sal.core.api.Consumer.ConsumerFunctionality;
-import org.opendaylight.controller.sal.core.api.Provider.ProviderFunctionality;
 import org.opendaylight.controller.sal.core.api.notify.NotificationListener;
-import org.opendaylight.controller.sal.core.api.notify.NotificationPublishService;
-import org.opendaylight.controller.sal.core.api.notify.NotificationService;
-import org.opendaylight.controller.sal.core.spi.BrokerModule;
 import org.opendaylight.controller.sal.dom.broker.spi.NotificationRouter;
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
 import org.opendaylight.yangtools.concepts.Registration;
@@ -32,16 +19,15 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.HashMultimap;
-import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Multimaps;
 
 public class NotificationRouterImpl implements NotificationRouter {
     private static Logger log = LoggerFactory.getLogger(NotificationRouterImpl.class);
 
-    private Multimap<QName, Registration<NotificationListener>> listeners = Multimaps.synchronizedSetMultimap(HashMultimap.<QName, Registration<NotificationListener>>create());
+    private final Multimap<QName, Registration<NotificationListener>> listeners = Multimaps.synchronizedSetMultimap(HashMultimap.<QName, Registration<NotificationListener>>create());
 //    private Registration<NotificationListener> defaultListener;
-    
+
     private void sendNotification(CompositeNode notification) {
         final QName type = notification.getNodeType();
         final Collection<Registration<NotificationListener>> toNotify = listeners.get(type);
@@ -66,7 +52,7 @@ public class NotificationRouterImpl implements NotificationRouter {
     public void publish(CompositeNode notification) {
         sendNotification(notification);
     }
-    
+
     @Override
     public Registration<NotificationListener> addNotificationListener(QName notification, NotificationListener listener) {
         ListenerRegistration ret = new ListenerRegistration(notification, listener);
index 0e63126bb36f3efbfcb7d02c5f59e694aa944bbf..24d5430d6d3713a0c6b3e5a5252eb710e9550e7d 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.controller.sal.dom.broker.osgi;
 
-import org.opendaylight.controller.sal.core.api.data.DataBrokerService;
 import org.opendaylight.controller.sal.core.api.mount.MountProvisionInstance;
 import org.opendaylight.controller.sal.core.api.mount.MountProvisionService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -16,23 +15,26 @@ import org.osgi.framework.ServiceReference;
 
 public class MountProviderServiceProxy extends AbstractBrokerServiceProxy<MountProvisionService> implements MountProvisionService{
 
-    
+
     public MountProviderServiceProxy(ServiceReference<MountProvisionService> ref, MountProvisionService delegate) {
         super(ref, delegate);
     }
 
+    @Override
     public MountProvisionInstance getMountPoint(InstanceIdentifier path) {
         return getDelegate().getMountPoint(path);
     }
 
+    @Override
     public MountProvisionInstance createMountPoint(InstanceIdentifier path) {
         return getDelegate().createMountPoint(path);
     }
 
+    @Override
     public MountProvisionInstance createOrGetMountPoint(InstanceIdentifier path) {
         return getDelegate().createOrGetMountPoint(path);
     }
-    
+
     @Override
     public ListenerRegistration<MountProvisionListener> registerProvisionListener(MountProvisionListener listener) {
         return getDelegate().registerProvisionListener(listener);
index 9881be0481cf016a8b48259ef3719effea75f3a3..d1523a01d695f2033ee9bfa557b1aaf0ea4c592d 100644 (file)
@@ -9,12 +9,10 @@ package org.opendaylight.controller.sal.dom.broker.spi;
 
 import java.util.Set;
 
-import org.opendaylight.controller.sal.core.api.RpcImplementation;
-import org.opendaylight.controller.sal.core.api.RpcProvisionRegistry;
 import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration;
-import org.opendaylight.controller.sal.core.api.RpcRegistrationListener;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.controller.sal.core.api.RpcImplementation;
+import org.opendaylight.controller.sal.core.api.RpcProvisionRegistry;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
@@ -23,14 +21,14 @@ public interface RpcRouter extends RpcProvisionRegistry, RpcImplementation {
 
     @Override
     public RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation);
-    
+
     @Override
     public RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation)
             throws IllegalArgumentException;
-    
+
     @Override
     public Set<QName> getSupportedRpcs();
-    
+
     @Override
     public RpcResult<CompositeNode> invokeRpc(QName rpc, CompositeNode input);
 }