Merge "Fix checkstyle - api.openflow.md.queue" into stable/boron
authorAnil Vishnoi <vishnoianil@gmail.com>
Fri, 14 Apr 2017 23:02:13 +0000 (23:02 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 14 Apr 2017 23:02:13 +0000 (23:02 +0000)
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/Enqueuer.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/HarvesterHandle.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/MessageSourcePollRegistrator.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/PopListener.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueItem.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueKeeper.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueProcessor.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/WaterMarkListener.java

index faac4ae217f9813b202359aee7a91f6d3e58d91a..38a49d1e2b19cda402e5941b1e43395800061855 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -10,17 +10,20 @@ package org.opendaylight.openflowplugin.api.openflow.md.queue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 
 /**
+ * Enqueuer.
  * @param <I> type of queue items (IN)
  */
 public interface Enqueuer<I> {
 
     /**
+     * item to be enqueued.
      * @param queueItem item to be enqueued
      */
     void enqueueQueueItem(I queueItem);
 
     /**
-     * @param queueItem
+     * for testing and comparing purposes - this strategy blocks netty threads.
+     * @param queueItem item
      * @deprecated for testing and comparing purposes - this strategy blocks netty threads
      */
     @Deprecated
index b9a5955297cd97f7f97d9e6e43d9181e8eb9b981..ec93933d5f94c52ad43014b0a5389aff20cc34dd 100644 (file)
@@ -1,6 +1,6 @@
-/**
+/*
  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- * 
+ *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -8,12 +8,12 @@
 package org.opendaylight.openflowplugin.api.openflow.md.queue;
 
 /**
- * message harvester simple control
+ * message harvester simple control.
  */
 public interface HarvesterHandle {
 
     /**
-     * wakeup harvester in case it is in phase of starving sleep
+     * wakeup harvester in case it is in phase of starving sleep.
      */
     void ping();
 
index ab668a675d4b421eb30e442627dc4e82d221353e..87a71f3e5f557c231c5c313842a71dbf3676035f 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -10,29 +10,34 @@ package org.opendaylight.openflowplugin.api.openflow.md.queue;
 import java.util.Collection;
 
 /**
+ * MessageSourcePollRegistrator.
  * @param <I> message wrapping type (IN)
  *
  */
 public interface MessageSourcePollRegistrator<I> {
 
     /**
+     * Message source to read from during processing.
      * @param messageSource to read from during processing
      * @return closeable registration
      */
     AutoCloseable registerMessageSource(I messageSource);
 
     /**
+     * Unregister message source.
      * @param messageSource to be unregistered
      * @return true if successfully unregistered
      */
     boolean unregisterMessageSource(I messageSource);
 
     /**
+     * Getter.
      * @return collection of registered message sources
      */
     Collection<I> getMessageSources();
 
     /**
+     * Getter.
      * @return the harvest handle
      */
     HarvesterHandle getHarvesterHandle();
index e81e24d788234e994fc13bba1c2ebad8b04dc294..da3c4675c6f9458c1e487a1b3b582d0b542d483c 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -9,15 +9,10 @@ package org.opendaylight.openflowplugin.api.openflow.md.queue;
 
 
 /**
- * @author mirehak
+ * PopListener.
  * @param <T> result type
  *
  */
 public interface PopListener<T> {
-    
-    /**
-     * @param processedMessage
-     */
     void onPop(T processedMessage);
-
 }
index f5c91684e6b54b1960422d2a4639edaeaae867ab..96f3b38e8a3a717bae6062262808390c633ca026 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -10,21 +10,25 @@ package org.opendaylight.openflowplugin.api.openflow.md.queue;
 import org.opendaylight.openflowplugin.api.openflow.md.core.ConnectionConductor;
 
 /**
+ * Queue item.
  * @param <I> input message type (IN)
  */
 public interface QueueItem<I> {
 
     /**
+     * Getter.
      * @return wrapped message
      */
     I getMessage();
 
     /**
+     * Getter.
      * @return conductor the message arrived to
      */
     ConnectionConductor getConnectionConductor();
 
     /**
+     * Getter.
      * @return queue type associated to this item
      */
     QueueKeeper.QueueType getQueueType();
index 8176a5fab388a667b1eb541d865ddbae273221eb..4fc3ff3a25d0297d4c5b38bb4a83d443bac56f5f 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -13,7 +13,7 @@ import org.opendaylight.openflowplugin.api.openflow.md.core.ConnectionConductor;
  * This processing mechanism based on queue. Processing consists of 2 steps: translate and publish.
  * Proposed workflow (might slightly deviate in implementations):
  * <ol>
- * <li>messages of input type are pushed in (via {@link QueueKeeper#push(Object, ConnectionConductor, QueueType)} and similar)</li>
+ * <li>messages of input type are pushed in (via {@link QueueKeeper} and similar)</li>
  * <li>ticket (executable task) is build upon each pushed message and enqueued</li>
  * <li>ticket is translated using appropriate translator</li>
  * <li>ticket is dequeued and result is published by appropriate popListener</li>
@@ -23,27 +23,30 @@ import org.opendaylight.openflowplugin.api.openflow.md.core.ConnectionConductor;
  */
 public interface QueueKeeper<I> extends AutoCloseable {
 
-    /** type of message enqueue */
-    public enum QueueType {
-        /** ordered processing */
+    /** type of message enqueue. */
+    enum QueueType {
+        /** ordered processing. */
         DEFAULT,
-        /** unordered processing - bypass fair processing */
-        UNORDERED}
+        /** unordered processing - bypass fair processing. */
+        UNORDERED
+    }
 
     /**
-     * enqueue message for processing
-     * @param message
+     * enqueue message for processing.
+     * @param message message
      * @param conductor source of message
      * @param queueType - {@link QueueType#DEFAULT} if message order matters, {@link QueueType#UNORDERED} otherwise
      */
     void push(I message, ConnectionConductor conductor, QueueType queueType);
 
     /**
-     * @return oldest item from queue - if available and remove it from queue
+     * oldest item from queue - if available and remove it from queue.
+     * @return oldest item from queue
      */
     QueueItem<I> poll();
 
     /**
+     * Setter.
      * @param processingRegistration the processingRegistration to set (in order to provide close method)
      */
     void setPollRegistration(AutoCloseable processingRegistration);
index e1f0e38c4add2e56063e3ecf143a82aa6da21d47..e2dc95e6954635e2e4b54639313042f5f861f8b4 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -17,7 +17,7 @@ import org.opendaylight.openflowplugin.api.openflow.md.core.TranslatorKey;
  * This processing mechanism based on queue. Processing consists of 2 steps: translate and publish.
  * Proposed workflow (might slightly deviate in implementations):
  * <ol>
- * <li>messages of input type are pushed in (via {@link QueueKeeper#push(Object, org.opendaylight.openflowplugin.api.openflow.md.core.ConnectionConductor, org.opendaylight.openflowplugin.api.openflow.md.queue.QueueKeeper.QueueType)} and similar)</li>
+ * <li>messages of input type are pushed in (via {@link QueueKeeper and similar})</li>
  * <li>ticket (executable task) is build upon each pushed message and enqueued</li>
  * <li>ticket is translated using appropriate translator</li>
  * <li>ticket is dequeued and result is published by appropriate popListener</li>
@@ -29,11 +29,13 @@ import org.opendaylight.openflowplugin.api.openflow.md.core.TranslatorKey;
 public interface QueueProcessor<I, O> extends MessageSourcePollRegistrator<QueueKeeper<I>>, Enqueuer<QueueItem<I>> {
 
     /**
+     * translators for message processing.
      * @param translatorMapping translators for message processing
      */
     void setTranslatorMapping(Map<TranslatorKey, Collection<IMDMessageTranslator<I, List<O>>>> translatorMapping);
 
     /**
+     * listeners invoked when processing done.
      * @param popListenersMapping listeners invoked when processing done
      */
     void setPopListenersMapping(Map<Class<? extends O>, Collection<PopListener<O>>> popListenersMapping);
index 77da8f0780ce7086c29924fdc4c474628ed9b06a..5c56516bd6c75fa55ebd6e67974e954a82b879c7 100644 (file)
@@ -11,12 +11,12 @@ package org.opendaylight.openflowplugin.api.openflow.md.queue;
 public interface WaterMarkListener {
 
     /**
-     * When HighWaterMark reached and currently not flooded
+     * When HighWaterMark reached and currently not flooded.
      */
     void onHighWaterMark();
 
     /**
-     * When LowWaterMark reached and currently flooded
+     * When LowWaterMark reached and currently flooded.
      */
     void onLowWaterMark();
 }