BUG-1075: ingress back pressure
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / SwitchConnectionHandlerImpl.java
index 50d3bee271044d4f7c4f0e4e2db329b093460020..ecb9757f85c007e1e5cd092878a2be0d051f3822 100644 (file)
@@ -16,7 +16,7 @@ import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
 import org.opendaylight.openflowplugin.openflow.md.core.session.OFSessionUtil;
 import org.opendaylight.openflowplugin.openflow.md.queue.MessageSpy;
-import org.opendaylight.openflowplugin.openflow.md.queue.QueueKeeperLightImpl;
+import org.opendaylight.openflowplugin.openflow.md.queue.QueueProcessorLightImpl;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 /**
@@ -26,7 +26,7 @@ public class SwitchConnectionHandlerImpl implements SwitchConnectionHandler {
     
     private ScheduledThreadPoolExecutor spyPool; 
 
-    private QueueKeeperLightImpl queueKeeper;
+    private QueueProcessorLightImpl queueProcessor;
     private ErrorHandler errorHandler;
     private MessageSpy<DataContainer> messageSpy;
     private int spyRate = 10;
@@ -35,7 +35,7 @@ public class SwitchConnectionHandlerImpl implements SwitchConnectionHandler {
      *
      */
     public SwitchConnectionHandlerImpl() {
-        queueKeeper = new QueueKeeperLightImpl();
+        queueProcessor = new QueueProcessorLightImpl();
         
         //TODO: implement shutdown invocation upon service stop event
         spyPool = new ScheduledThreadPoolExecutor(1);
@@ -45,11 +45,11 @@ public class SwitchConnectionHandlerImpl implements SwitchConnectionHandler {
      * wire all up
      */
     public void init() {
-        queueKeeper.setTranslatorMapping(OFSessionUtil.getTranslatorMap());
-        queueKeeper.setPopListenersMapping(OFSessionUtil.getPopListenerMapping());
-        queueKeeper.setMessageSpy(messageSpy);
+        queueProcessor.setTranslatorMapping(OFSessionUtil.getTranslatorMap());
+        queueProcessor.setPopListenersMapping(OFSessionUtil.getPopListenerMapping());
+        queueProcessor.setMessageSpy(messageSpy);
         
-        queueKeeper.init();
+        queueProcessor.init();
         
         spyPool.scheduleAtFixedRate(messageSpy, spyRate, spyRate, TimeUnit.SECONDS);
     }
@@ -63,7 +63,7 @@ public class SwitchConnectionHandlerImpl implements SwitchConnectionHandler {
     @Override
     public void onSwitchConnected(ConnectionAdapter connectionAdapter) {
         ConnectionConductor conductor = ConnectionConductorFactory.createConductor(
-                connectionAdapter, queueKeeper);
+                connectionAdapter, queueProcessor);
         conductor.setErrorHandler(errorHandler);
     }