From: Jozef Bacigal Date: Thu, 23 Mar 2017 14:21:43 +0000 (+0100) Subject: Fix checkstyle - api.openflow.md.queue X-Git-Tag: release/carbon~43^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=dc8e9554a3ca8e00667cdcc582c567d6106f24fa;p=openflowplugin.git Fix checkstyle - api.openflow.md.queue Change-Id: I1c91dcee7b74ac1dba17e5c04651009c312124c3 Signed-off-by: Jozef Bacigal --- diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/Enqueuer.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/Enqueuer.java index faac4ae217..38a49d1e2b 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/Enqueuer.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/Enqueuer.java @@ -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 type of queue items (IN) */ public interface Enqueuer { /** + * 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 diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/HarvesterHandle.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/HarvesterHandle.java index b9a5955297..ec93933d5f 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/HarvesterHandle.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/HarvesterHandle.java @@ -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(); diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/MessageSourcePollRegistrator.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/MessageSourcePollRegistrator.java index ab668a675d..87a71f3e5f 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/MessageSourcePollRegistrator.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/MessageSourcePollRegistrator.java @@ -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 message wrapping type (IN) * */ public interface MessageSourcePollRegistrator { /** + * 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 getMessageSources(); /** + * Getter. * @return the harvest handle */ HarvesterHandle getHarvesterHandle(); diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/PopListener.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/PopListener.java index e81e24d788..da3c4675c6 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/PopListener.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/PopListener.java @@ -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 result type * */ public interface PopListener { - - /** - * @param processedMessage - */ void onPop(T processedMessage); - } diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueItem.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueItem.java index f5c91684e6..96f3b38e8a 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueItem.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueItem.java @@ -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 input message type (IN) */ public interface QueueItem { /** + * 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(); diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueKeeper.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueKeeper.java index 8176a5fab3..4fc3ff3a25 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueKeeper.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueKeeper.java @@ -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): *
    - *
  1. messages of input type are pushed in (via {@link QueueKeeper#push(Object, ConnectionConductor, QueueType)} and similar)
  2. + *
  3. messages of input type are pushed in (via {@link QueueKeeper} and similar)
  4. *
  5. ticket (executable task) is build upon each pushed message and enqueued
  6. *
  7. ticket is translated using appropriate translator
  8. *
  9. ticket is dequeued and result is published by appropriate popListener
  10. @@ -23,27 +23,30 @@ import org.opendaylight.openflowplugin.api.openflow.md.core.ConnectionConductor; */ public interface QueueKeeper 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 poll(); /** + * Setter. * @param processingRegistration the processingRegistration to set (in order to provide close method) */ void setPollRegistration(AutoCloseable processingRegistration); diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueProcessor.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueProcessor.java index e1f0e38c4a..e2dc95e695 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueProcessor.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/QueueProcessor.java @@ -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): *
      - *
    1. 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)
    2. + *
    3. messages of input type are pushed in (via {@link QueueKeeper and similar})
    4. *
    5. ticket (executable task) is build upon each pushed message and enqueued
    6. *
    7. ticket is translated using appropriate translator
    8. *
    9. ticket is dequeued and result is published by appropriate popListener
    10. @@ -29,11 +29,13 @@ import org.opendaylight.openflowplugin.api.openflow.md.core.TranslatorKey; public interface QueueProcessor extends MessageSourcePollRegistrator>, Enqueuer> { /** + * translators for message processing. * @param translatorMapping translators for message processing */ void setTranslatorMapping(Map>>> translatorMapping); /** + * listeners invoked when processing done. * @param popListenersMapping listeners invoked when processing done */ void setPopListenersMapping(Map, Collection>> popListenersMapping); diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/WaterMarkListener.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/WaterMarkListener.java index 77da8f0780..5c56516bd6 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/WaterMarkListener.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/queue/WaterMarkListener.java @@ -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(); }