Convert OF samples to use DTCL instead of DCL
[openflowplugin.git] / samples / learning-switch / src / main / java / org / opendaylight / openflowplugin / learningswitch / multi / MultipleLearningSwitchHandlerFacadeImpl.java
index 7824dce3fd1e933bd91fd64844e223fa9549f926..7f08744af8f77276c78ce97f8295f462e61569da 100644 (file)
@@ -8,9 +8,9 @@
 
 package org.opendaylight.openflowplugin.learningswitch.multi;
 
-import org.opendaylight.openflowplugin.learningswitch.DataChangeListenerRegistrationHolder;
-import org.opendaylight.openflowplugin.learningswitch.InstanceIdentifierUtils;
+import org.opendaylight.openflowplugin.learningswitch.DataTreeChangeListenerRegistrationHolder;
 import org.opendaylight.openflowplugin.learningswitch.FlowCommitWrapper;
+import org.opendaylight.openflowplugin.learningswitch.InstanceIdentifierUtils;
 import org.opendaylight.openflowplugin.learningswitch.LearningSwitchHandler;
 import org.opendaylight.openflowplugin.learningswitch.LearningSwitchHandlerSimpleImpl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
@@ -20,14 +20,9 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * 
- */
 public class MultipleLearningSwitchHandlerFacadeImpl implements LearningSwitchHandler {
-    
-    private static final Logger LOG = LoggerFactory
-            .getLogger(MultipleLearningSwitchHandlerFacadeImpl.class);
-    
+
+    private static final Logger LOG = LoggerFactory.getLogger(MultipleLearningSwitchHandlerFacadeImpl.class);
     private FlowCommitWrapper dataStoreAccessor;
     private PacketProcessingService packetProcessingService;
     private PacketInDispatcherImpl packetInDispatcher;
@@ -35,28 +30,26 @@ public class MultipleLearningSwitchHandlerFacadeImpl implements LearningSwitchHa
     @Override
     public synchronized void onSwitchAppeared(InstanceIdentifier<Table> appearedTablePath) {
         LOG.debug("expected table acquired, learning ..");
-       
+
         /**
          * appearedTablePath is in form of /nodes/node/node-id/table/table-id
          * so we shorten it to /nodes/node/node-id to get identifier of switch.
-         * 
          */
         InstanceIdentifier<Node> nodePath = InstanceIdentifierUtils.getNodePath(appearedTablePath);
-        
+
         /**
          * We check if we already initialized dispatcher for that node,
          * if not we create new handler for switch.
-         * 
          */
         if (!packetInDispatcher.getHandlerMapping().containsKey(nodePath)) {
-            // delegate this node (owning appearedTable) to SimpleLearningSwitchHandler  
+            // delegate this node (owning appearedTable) to SimpleLearningSwitchHandler
             LearningSwitchHandlerSimpleImpl simpleLearningSwitch = new LearningSwitchHandlerSimpleImpl();
             /**
              * We set runtime dependencies
              */
             simpleLearningSwitch.setDataStoreAccessor(dataStoreAccessor);
             simpleLearningSwitch.setPacketProcessingService(packetProcessingService);
-            
+
             /**
              * We propagate table event to newly instantiated instance of learning switch
              */
@@ -70,15 +63,15 @@ public class MultipleLearningSwitchHandlerFacadeImpl implements LearningSwitchHa
 
     @Override
     public void setRegistrationPublisher(
-            DataChangeListenerRegistrationHolder registrationPublisher) {
+            DataTreeChangeListenerRegistrationHolder registrationPublisher) {
         //NOOP
     }
-    
+
     @Override
     public void setDataStoreAccessor(FlowCommitWrapper dataStoreAccessor) {
         this.dataStoreAccessor = dataStoreAccessor;
     }
-    
+
     @Override
     public void setPacketProcessingService(
             PacketProcessingService packetProcessingService) {