Fix checkstyle API. 27/59227/1
authorJozef Bacigal <jozef.bacigal@pantheon.tech>
Tue, 20 Jun 2017 12:55:06 +0000 (14:55 +0200)
committerJozef Bacigal <jozef.bacigal@pantheon.tech>
Tue, 20 Jun 2017 12:55:38 +0000 (14:55 +0200)
Change-Id: Ia25e794c95722f9ff9bf60393bbd18d803296581
Signed-off-by: Jozef Bacigal <jozef.bacigal@pantheon.tech>
60 files changed:
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/OFConstants.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OFPContext.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OpenFlowPluginConfigurationService.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OpenFlowPluginProvider.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/connection/ConnectionContext.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/connection/ConnectionManager.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceContext.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceManager.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/TxFacade.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/handlers/ClusterInitializationPhaseHandler.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/handlers/DeviceConnectedHandler.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/handlers/DeviceDisconnectedHandler.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/handlers/DeviceRemovedHandler.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/lifecycle/ContextChain.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/lifecycle/ContextChainHolder.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/lifecycle/ContextChainMastershipState.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/lifecycle/ContextChainState.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/lifecycle/ContextChainStateListener.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/lifecycle/LifecycleService.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/lifecycle/MastershipChangeListener.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/protocol/serialization/MatchEntrySerializer.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/registry/ItemLifeCycleRegistry.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/registry/flow/DeviceFlowRegistry.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/rpc/ItemLifeCycleKeeper.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/rpc/ItemLifeCycleSource.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/rpc/RpcContext.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/rpc/RpcManager.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/rpc/listener/ItemLifecycleListener.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/MessageCountDumper.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/MessageObservatory.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/MessageSpy.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/StatisticsContext.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/StatisticsManager.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/compatibility/BackwardCompatibleAtomicService.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/compatibility/Delegator.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/ofpspecific/MessageIntelligenceAgency.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/statistics/ofpspecific/MessageSpy.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/translator/TranslatorLibrarian.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/PacketInRateLimiter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractMultipartRequestOnTheFlyCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractRequestCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SimpleRequestCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/VoidRequestCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/ofpspecific/MessageIntelligenceAgencyImpl.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/PacketInRateLimiterTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/ofpspecific/MessageIntelligenceAgencyImplTest.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/NotificationPopListener.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/RpcListeningExecutorService.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskUtil.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/queue/QueueProcessorLightImpl.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/statistics/MessageSpyCounterImpl.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/statistics/MessageSpyCounterImplTest.java

index 7a5a4a2a48512dc08a89535965671cedada1f258..6148f5fbcd766b4cd707396d101c5e3351f7cab9 100644 (file)
@@ -74,6 +74,6 @@ public final class OFConstants {
     /** RpcError tag - timeout. */
     public static final String ERROR_TAG_TIMEOUT = "TIMOUT";
 
-    /** Persistent ID of OpenFlowPlugin configuration file */
+    /** Persistent ID of OpenFlowPlugin configuration file. */
     public static final String CONFIG_FILE_ID = "org.opendaylight.openflowplugin";
 }
index 43d6b5bdc234289c8c07e785e81e5e5ed651d438..4d9a11c4daeeac2877986c28a0da8e6eb648c866 100644 (file)
@@ -7,11 +7,8 @@
  */
 package org.opendaylight.openflowplugin.api.openflow;
 
-import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
-import java.util.concurrent.RejectedExecutionException;
 import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
-import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 import org.opendaylight.openflowplugin.api.openflow.device.handlers.ClusterInitializationPhaseHandler;
 import org.opendaylight.openflowplugin.api.openflow.device.handlers.ClusterLifecycleSupervisor;
@@ -22,12 +19,10 @@ import org.opendaylight.openflowplugin.api.openflow.device.handlers.ClusterLifec
 public interface OFPContext extends AutoCloseable, ClusterLifecycleSupervisor, ClusterInitializationPhaseHandler {
 
 
-    String MESSAGE = "Cannot stop abstract services, check implementation of cluster services";
-
     /**
      * Context state.
      */
-    enum CONTEXT_STATE {
+    enum ContextState {
         /* Initialization phase, context not yet fully initialized */
         INITIALIZATION,
         /* Standard working phase everything is fine */
@@ -40,7 +35,7 @@ public interface OFPContext extends AutoCloseable, ClusterLifecycleSupervisor, C
      * Get actual context state.
      * @return actual context state
      */
-    CONTEXT_STATE getState();
+    ContextState getState();
 
     /**
      * About to stop services in cluster not master anymore or going down.
index 23b98651e867b5de3afc7b8d7f4bec3986a105b6..1f7adb61fdd57e1ddc33b6f2189695c0c437f2a1 100644 (file)
@@ -13,7 +13,7 @@ import java.util.Map;
 import javax.annotation.Nonnull;
 
 /**
- * Manages OpenFlowPlugin configuration
+ * Manages OpenFlowPlugin configuration.
  */
 public interface OpenFlowPluginConfigurationService {
 
@@ -93,12 +93,12 @@ public interface OpenFlowPluginConfigurationService {
         private static final Map<String, PropertyType> KEY_VALUE_MAP;
 
         /**
-         * Get property type from property key
+         * Get property type from property key.
          *
          * @param key the property key
          * @return the property type
          */
-        public static PropertyType forValue(final String key) {
+        public static PropertyType forValue(String key) {
             return KEY_VALUE_MAP.get(key);
         }
 
@@ -114,7 +114,7 @@ public interface OpenFlowPluginConfigurationService {
         }
 
         /**
-         * Converts enum name to property key
+         * Converts enum name to property key.
          *
          * @return the property key
          */
@@ -126,14 +126,14 @@ public interface OpenFlowPluginConfigurationService {
     }
 
     /**
-     * Parses key-value pairs of properties read from OpenFlowPlugin configuration file and processes them
+     * Parses key-value pairs of properties read from OpenFlowPlugin configuration file and processes them.
      *
      * @param properties properties
      */
     void update(@Nonnull Map<String,Object> properties);
 
     /**
-     * Parse and process single property key-value pair
+     * Parse and process single property key-value pair.
      *
      * @see org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginConfigurationService.PropertyType
      * @param key   property type
index 5eb41b5a92aab781e6b6fa77c093fc889971d991..cef86f8b0f86ba882485dda0d00e6b497bdb0a20 100644 (file)
@@ -11,7 +11,7 @@ package org.opendaylight.openflowplugin.api.openflow;
 import org.opendaylight.controller.md.sal.binding.api.BindingService;
 
 /**
- * Plugin services provider
+ * Plugin services provider.
  */
 public interface OpenFlowPluginProvider extends AutoCloseable, BindingService {
 
index 2c633542700c306bd326c48b87bb96a2cbd2a5d3..2e4a88fd1c6e9ddb69a6ce7a920dddea95ab7a2a 100644 (file)
@@ -157,7 +157,7 @@ public interface ConnectionContext {
     void handshakeSuccessful();
 
     /**
-     * Handle received port status message
+     * Handle received port status message.
      * @param portStatusMessage port status message
      */
     void handlePortStatusMessage(PortStatusMessage portStatusMessage);
index 7356f5b034904e1cb0156c58e83a160531feb3b9..f2f4467ab95869731ff53334674de891eebccda0 100644 (file)
@@ -24,13 +24,13 @@ public interface ConnectionManager extends SwitchConnectionHandler {
      * device is connected.
      * @param deviceConnectedHandler device connected handler
      */
-    void setDeviceConnectedHandler(final DeviceConnectedHandler deviceConnectedHandler);
+    void setDeviceConnectedHandler(DeviceConnectedHandler deviceConnectedHandler);
 
     /**
-     * Method registers handler responsible handling device disconnected event
+     * Method registers handler responsible handling device disconnected event.
      * @param deviceDisconnectedHandler device disconnected handler
      */
-    void setDeviceDisconnectedHandler(final DeviceDisconnectedHandler deviceDisconnectedHandler);
+    void setDeviceDisconnectedHandler(DeviceDisconnectedHandler deviceDisconnectedHandler);
 
     /**
      * Setter for echo reply timeout.
index b4fd0469b2437d162704e1dc685c83cc123e7f04..1e7e15b7ebbeeaa8d60aa98da7f7cfe5af6f36c9 100644 (file)
@@ -112,7 +112,7 @@ public interface DeviceContext extends
 
     MessageSpy getMessageSpy();
 
-    <T extends OfHeader> MultiMsgCollector<T> getMultiMsgCollector(final RequestContext<List<T>> requestContext);
+    <T extends OfHeader> MultiMsgCollector<T> getMultiMsgCollector(RequestContext<List<T>> requestContext);
 
     /**
      * indicates that device context is fully published (e.g.: packetIn messages should be passed).
@@ -139,7 +139,7 @@ public interface DeviceContext extends
      * Setter for sal role service.
      * @param salRoleService Role Service
      */
-    void setSalRoleService(@Nonnull final SalRoleService salRoleService);
+    void setSalRoleService(@Nonnull SalRoleService salRoleService);
 
     /**
      * Make device slave.
index d57c86e9f217fc85b4c878f41e70dd089369477d..4ee078150777e7443fd0334cf0a258f7a1220240 100644 (file)
@@ -46,16 +46,18 @@ public interface DeviceManager extends
 
     void setBarrierInterval(long barrierTimeoutLimit);
 
-    CheckedFuture<Void, TransactionCommitFailedException> removeDeviceFromOperationalDS(DeviceInfo deviceInfo);
+    CheckedFuture<Void, TransactionCommitFailedException> removeDeviceFromOperationalDS(
+            DeviceInfo deviceInfo);
 
-    CheckedFuture<Void, TransactionCommitFailedException> removeDeviceFromOperationalDS(final KeyedInstanceIdentifier<Node, NodeKey> ii);
+    CheckedFuture<Void, TransactionCommitFailedException> removeDeviceFromOperationalDS(
+            KeyedInstanceIdentifier<Node, NodeKey> ii);
 
-    DeviceContext createContext(@Nonnull final ConnectionContext connectionContext);
+    DeviceContext createContext(@Nonnull ConnectionContext connectionContext);
 
     long getBarrierIntervalNanos();
 
     int getBarrierCountLimit();
 
-    void sendNodeAddedNotification(@Nonnull final DeviceInfo deviceInfo);
+    void sendNodeAddedNotification(@Nonnull DeviceInfo deviceInfo);
 }
 
index e19fb62d491b78467072d3ba59f86e0e4da14cab..02661467c2437fe27426e84b86f874dee4d29911 100644 (file)
@@ -21,9 +21,7 @@ public interface TxFacade {
     /**
      * Method creates put operation using provided data in underlying transaction chain.
      */
-    <T extends DataObject> void writeToTransaction(final LogicalDatastoreType store,
-                                                   final InstanceIdentifier<T> path,
-                                                   final T data);
+    <T extends DataObject> void writeToTransaction(LogicalDatastoreType store, InstanceIdentifier<T> path, T data);
 
     /**
      * Method creates put operation using provided data in underlying transaction
@@ -31,15 +29,14 @@ public interface TxFacade {
      * WARNING: This method is slow because of additional reading cost.
      * Use it only if you really need to create parents.
      */
-    <T extends DataObject> void writeToTransactionWithParentsSlow(final LogicalDatastoreType store,
-                                                                  final InstanceIdentifier<T> path,
-                                                                  final T data);
+    <T extends DataObject> void writeToTransactionWithParentsSlow(LogicalDatastoreType store,
+                                                                  InstanceIdentifier<T> path,
+                                                                  T data);
 
     /**
      * Method creates delete operation for provided path in underlying transaction chain.
      */
-    <T extends DataObject> void addDeleteToTxChain(final LogicalDatastoreType store,
-                                                   final InstanceIdentifier<T> path);
+    <T extends DataObject> void addDeleteToTxChain(LogicalDatastoreType store, InstanceIdentifier<T> path);
 
     /**
      * Method submits Transaction to DataStore.
@@ -57,7 +54,7 @@ public interface TxFacade {
     ReadOnlyTransaction getReadTransaction();
 
     /**
-     * Method returns true if transaction chain manager is enabled
+     * Method returns true if transaction chain manager is enabled.
      * @return is transaction chain manager enabled
      */
     boolean isTransactionsEnabled();
index c46d3e07067b18ac5810dccecdf64dd5c90bbbf4..72520b04b57409536f631a6292f78c52982c7c78 100644 (file)
@@ -15,15 +15,15 @@ import org.opendaylight.openflowplugin.api.openflow.lifecycle.MastershipChangeLi
 public interface ClusterInitializationPhaseHandler {
 
     /**
-     * Method for initialization cycle between contexts
+     * Method for initialization cycle between contexts.
      * @param mastershipChangeListener - listener if something goes wrong with initialization
      */
-    boolean onContextInstantiateService(final MastershipChangeListener mastershipChangeListener);
+    boolean onContextInstantiateService(MastershipChangeListener mastershipChangeListener);
 
     /**
      * Method for initial submit transaction after successful initial gathering.
      */
-    default boolean initialSubmitTransaction(){
+    default boolean initialSubmitTransaction() {
         //This method need to be override only in device context to submit initial data.
         return false;
     }
index d4a833a2c359da4b027b8df4062ecbfd98665029..04fdff9df345c70586c3960dfc3f15c4632da1d0 100644 (file)
@@ -21,7 +21,7 @@ public interface DeviceConnectedHandler {
      * Method is used to propagate information about established connection with device.
      * It propagates connected device's connection context.
      */
-    ConnectionStatus deviceConnected(final ConnectionContext connectionContext)
+    ConnectionStatus deviceConnected(ConnectionContext connectionContext)
             throws Exception;
 
 }
index 290d9db9aec3c79f27ef8b72ff95a312db8ce38a..d992e733b2e9b0ad308bd7ce10364e0c2c3dbfdb 100644 (file)
@@ -20,5 +20,5 @@ public interface DeviceDisconnectedHandler {
      * Method is used to propagate information about closed connection with device.
      * It propagates connected device's connection context.
      */
-    void onDeviceDisconnected(final ConnectionContext connectionContext);
+    void onDeviceDisconnected(ConnectionContext connectionContext);
 }
\ No newline at end of file
index 0a9bbad8b0a1bce1678224f43417bda5b370d8c0..168522b42ee47bac10f8d7b91ce1baf0daac9dab 100644 (file)
@@ -18,5 +18,5 @@ public interface DeviceRemovedHandler {
     /**
      * Method is used to propagate information about device being removed from manager.
      */
-    void onDeviceRemoved(final DeviceInfo deviceInfo);
+    void onDeviceRemoved(DeviceInfo deviceInfo);
 }
index f876e677a93efe27c0aca097fa5626d94f8a3c20..5e8cc28908364f362e94a5f8c1015956f63ce09b 100644 (file)
@@ -22,9 +22,9 @@ public interface ContextChain extends AutoCloseable {
      * Add context to the chain, if reference already exist ignore it.
      * @param context child of OFPContext
      */
-    <T extends OFPContext> void addContext(final T context);
+    <T extends OFPContext> void addContext(T context);
 
-    void addLifecycleService(final LifecycleService lifecycleService);
+    void addLifecycleService(LifecycleService lifecycleService);
 
     /**
      * Stop the working contexts, but not release them.
@@ -50,7 +50,7 @@ public interface ContextChain extends AutoCloseable {
      * Registers context chain into cluster singleton service.
      * @param clusterSingletonServiceProvider provider
      */
-    void registerServices(final ClusterSingletonServiceProvider clusterSingletonServiceProvider);
+    void registerServices(ClusterSingletonServiceProvider clusterSingletonServiceProvider);
 
     /**
      * After connect of device make this device SLAVE.
@@ -62,7 +62,7 @@ public interface ContextChain extends AutoCloseable {
      * @param mastershipState - state master on device, initial gather, initial submit, initial registry fill
      * @return true if everything done fine
      */
-    boolean isMastered(@Nonnull final ContextChainMastershipState mastershipState);
+    boolean isMastered(@Nonnull ContextChainMastershipState mastershipState);
 
     /**
      * Device need to be in state SLAVE or MASTER.
@@ -75,12 +75,12 @@ public interface ContextChain extends AutoCloseable {
      * @param connectionContext new connection to the device.
      * @return false if primary connection is broken
      */
-    boolean addAuxiliaryConnection(@Nonnull final ConnectionContext connectionContext);
+    boolean addAuxiliaryConnection(@Nonnull ConnectionContext connectionContext);
 
     /**
      * Check if connection is auxiliary and if yes then continue working.
      * @param connectionContext connection to the device
      * @return false if this is primary connection
      */
-    boolean auxiliaryConnectionDropped(@Nonnull final ConnectionContext connectionContext);
+    boolean auxiliaryConnectionDropped(@Nonnull ConnectionContext connectionContext);
 }
index 205c854aed51af91c7d143c24563bc9196cad8af..b6462523ecea2fe56c8a46a558cba5f2157a145a 100644 (file)
@@ -28,7 +28,7 @@ public interface ContextChainHolder extends
         MastershipChangeListener,
         DeviceDisconnectedHandler,
         EntityOwnershipListener,
-        AutoCloseable{
+        AutoCloseable {
 
     /**
      * Managers need to be added before.
@@ -38,32 +38,32 @@ public interface ContextChainHolder extends
      * @param manager a child class of {@link OFPManager}
      * @param <T> {@link OFPManager}
      */
-    <T extends OFPManager> void addManager(final T manager);
+    <T extends OFPManager> void addManager(T manager);
 
     /**
      * Create a new context chain.
      * @param connectionContext new connection
      * @return {@link ContextChain}
      */
-    ContextChain createContextChain(final ConnectionContext connectionContext);
+    ContextChain createContextChain(ConnectionContext connectionContext);
 
     /**
      * Called if connection needs to be destroyed.
      * @param deviceInfo {@link DeviceInfo}
      */
-    ListenableFuture<Void> destroyContextChain(final DeviceInfo deviceInfo);
+    ListenableFuture<Void> destroyContextChain(DeviceInfo deviceInfo);
 
     /**
      * Provider is needed to register cluster singleton service.
      * @param singletonServicesProvider provider
      */
-    void addSingletonServicesProvider(final ClusterSingletonServiceProvider singletonServicesProvider);
+    void addSingletonServicesProvider(ClusterSingletonServiceProvider singletonServicesProvider);
 
     /**
      * Register EOS listener.
      * @param entityOwnershipService EOS services
      */
-    void changeEntityOwnershipService(final EntityOwnershipService entityOwnershipService);
+    void changeEntityOwnershipService(EntityOwnershipService entityOwnershipService);
 
     @Override
     void close() throws Exception;
index 9f97861cd395f1ee0c49e6961e67785abdd015ec..2dd2bbfcb380196051859f004080efb517184098 100644 (file)
@@ -1,32 +1,32 @@
-/*\r
- * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.openflowplugin.api.openflow.lifecycle;\r
-\r
-public enum ContextChainMastershipState {\r
-    /**\r
-     * Device has role MASTER set.\r
-     */\r
-    MASTER_ON_DEVICE,\r
-    /**\r
-     * Initial statics gathering done ok.\r
-     */\r
-    INITIAL_GATHERING,\r
-    /**\r
-     * Initial submit ok.\r
-     */\r
-    INITIAL_SUBMIT,\r
-    /**\r
-     * Initial flow registry fill is done.\r
-     */\r
-    INITIAL_FLOW_REGISTRY_FILL,\r
-    /**\r
-     * Check mastership.\r
-     */\r
-    CHECK\r
-\r
-}\r
+/*
+ * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
+ */
+package org.opendaylight.openflowplugin.api.openflow.lifecycle;
+
+public enum ContextChainMastershipState {
+    /**
+     * Device has role MASTER set.
+     */
+    MASTER_ON_DEVICE,
+    /**
+     * Initial statics gathering done ok.
+     */
+    INITIAL_GATHERING,
+    /**
+     * Initial submit ok.
+     */
+    INITIAL_SUBMIT,
+    /**
+     * Initial flow registry fill is done.
+     */
+    INITIAL_FLOW_REGISTRY_FILL,
+    /**
+     * Check mastership.
+     */
+    CHECK
+
+}
index c34a8d19e3e0e8b72d401380c2fcf02b94efe6f1..8cfc3eecec5680f48d4cc6cac6859a4dca689f23 100644 (file)
@@ -1,24 +1,24 @@
-/*\r
- * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.openflowplugin.api.openflow.lifecycle;\r
-\r
-public enum ContextChainState {\r
-    /**\r
-     * Context chain is working as MASTER.\r
-     */\r
-    WORKING_MASTER,\r
-    /**\r
-     * Context chain is working as SLAVE, initial gathering already done.\r
-     */\r
-    WORKING_SLAVE,\r
-    /**\r
-     * Context chain is undefined.\r
-     */\r
-    UNDEFINED\r
-\r
-}\r
+/*
+ * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
+ */
+package org.opendaylight.openflowplugin.api.openflow.lifecycle;
+
+public enum ContextChainState {
+    /**
+     * Context chain is working as MASTER.
+     */
+    WORKING_MASTER,
+    /**
+     * Context chain is working as SLAVE, initial gathering already done.
+     */
+    WORKING_SLAVE,
+    /**
+     * Context chain is undefined.
+     */
+    UNDEFINED
+
+}
index c9dfb393f576c6a72834e2af2bddb8d2e2ca6a0f..0ddf40e0b053a7c17067526eda2a856b108c9059 100644 (file)
@@ -9,12 +9,12 @@
 package org.opendaylight.openflowplugin.api.openflow.lifecycle;
 
 /**
- * Listens to changes about context chain state
+ * Listens to changes about context chain state.
  */
 public interface ContextChainStateListener {
 
     /**
-     * Event triggered on context chain state change
+     * Event triggered on context chain state change.
      * @param state context chain state
      */
     void onStateAcquired(ContextChainState state);
index ca80254084533d2c4f819535e930a084135f3ac5..92c61fbceb6d1752edcbc9bc5946043431867e57 100644 (file)
@@ -11,10 +11,7 @@ package org.opendaylight.openflowplugin.api.openflow.lifecycle;
 import javax.annotation.Nonnull;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService;
 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
-import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
-import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.ClusterInitializationPhaseHandler;
 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler;
 
 /**
@@ -27,20 +24,20 @@ public interface LifecycleService extends ClusterSingletonService, AutoCloseable
      * @param singletonServiceProvider      from md-sal binding
      * @param deviceContext                 device
      */
-    void registerService(@Nonnull final ClusterSingletonServiceProvider singletonServiceProvider,
-                         @Nonnull final DeviceContext deviceContext);
+    void registerService(@Nonnull ClusterSingletonServiceProvider singletonServiceProvider,
+                         @Nonnull DeviceContext deviceContext);
 
     /**
      * This method registers device removed handler what will be executed when device should be removed.
      * @param deviceRemovedHandler device removed handler
      */
-    void registerDeviceRemovedHandler(@Nonnull final DeviceRemovedHandler deviceRemovedHandler);
+    void registerDeviceRemovedHandler(@Nonnull DeviceRemovedHandler deviceRemovedHandler);
 
     /**
      * Make device SLAVE.
      * @param deviceContext provide device context which can't be stored in lifecycle service.
      */
-    void makeDeviceSlave(final DeviceContext deviceContext);
+    void makeDeviceSlave(DeviceContext deviceContext);
 
     @Override
     void close();
index aab1ce1705697ac815b8d9e5ace42c2b2647946c..22ca8c15f8251af7bd906f73c98f09d1ff451d29 100644 (file)
@@ -22,7 +22,7 @@ public interface MastershipChangeListener {
      * @param reason reason
      * @param mandatory if it is mandatory connection will be dropped
      */
-    void onNotAbleToStartMastership(final DeviceInfo deviceInfo, @Nonnull final String reason, final boolean mandatory);
+    void onNotAbleToStartMastership(DeviceInfo deviceInfo, @Nonnull String reason, boolean mandatory);
 
     /**
      * Event occurs if there was a try to acquire MASTER role.
@@ -30,26 +30,26 @@ public interface MastershipChangeListener {
      * @param deviceInfo for this device
      * @param reason reason
      */
-    default void onNotAbleToStartMastershipMandatory(final DeviceInfo deviceInfo, @Nonnull final String reason) {
+    default void onNotAbleToStartMastershipMandatory(DeviceInfo deviceInfo, @Nonnull String reason) {
         onNotAbleToStartMastership(deviceInfo, reason, true);
     }
 
     /**
      * Changed to MASTER role on device.
      * @param deviceInfo device
-     * @param mastershipState
+     * @param mastershipState state
      */
-    void onMasterRoleAcquired(final DeviceInfo deviceInfo, @Nonnull final ContextChainMastershipState mastershipState);
+    void onMasterRoleAcquired(DeviceInfo deviceInfo, @Nonnull ContextChainMastershipState mastershipState);
 
     /**
      * Change to SLAVE role on device was successful.
      * @param deviceInfo device
      */
-    void onSlaveRoleAcquired(final DeviceInfo deviceInfo);
+    void onSlaveRoleAcquired(DeviceInfo deviceInfo);
 
     /**
      * Change to SLAVE role on device was not able.
      * @param deviceInfo device
      */
-    void onSlaveRoleNotAcquired(final DeviceInfo deviceInfo);
+    void onSlaveRoleNotAcquired(DeviceInfo deviceInfo);
 }
index c1a7032c4df0ddfce66a75025361b62f37e9606f..1f923aa822076d9dec67ec948f058f4034e84db6 100644 (file)
@@ -18,6 +18,6 @@ public interface MatchEntrySerializer extends OFSerializer<Match> {
      * @param match Openflow match
      * @return true if matched
      */
-    boolean matchTypeCheck(final Match match);
+    boolean matchTypeCheck(Match match);
 
 }
\ No newline at end of file
index ed51e0fecbdb9fad6fc139ad39555561faa29fd1..60e061e3f7c1603955befb78204a9a5a06a496bb 100644 (file)
@@ -17,7 +17,7 @@ import org.opendaylight.yangtools.concepts.Registration;
 public interface ItemLifeCycleRegistry {
 
     /**
-     * register given life cycle source to known sources of device
+     * register given life cycle source to known sources of device.
      *
      * @param lifeCycleSource life cycle changes provider
      * @return closeable registration
@@ -25,11 +25,12 @@ public interface ItemLifeCycleRegistry {
     Registration registerLifeCycleSource(ItemLifeCycleSource lifeCycleSource);
 
     /**
-     * close all existing registrations
+     * close all existing registrations.
      */
     void clear();
 
     /**
+     * Registered sources.
      * @return registered sources
      */
     Iterable<ItemLifeCycleSource> getLifeCycleSources();
index 6dbd7094737a2431e916084732066000fc06cc1e..80fbd69253a4b78fc1e585103cf268bf0964fa9e 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.openflowplugin.api.openflow.registry.flow;
 
-
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.List;
index c6cc2c3cdcfca1f0c3c98a443045fa9b065babb5..c47dcdf3a3ec9f81507feb94e89c4a5fc5c88f15 100644 (file)
@@ -12,11 +12,12 @@ import javax.annotation.Nullable;
 import org.opendaylight.openflowplugin.api.openflow.rpc.listener.ItemLifecycleListener;
 
 /**
- * provides read-write access to assigned {@link ItemLifecycleListener}
+ * provides read-write access to assigned {@link ItemLifecycleListener}.
  */
 public interface ItemLifeCycleKeeper extends ItemLifeCycleSource {
 
     /**
+     * lifecycle listener.
      * @return assigned item lifecycle listener
      */
     @Nullable
index 4bab964e0523989505a392b4dfbc259acaa589d0..a62e9090959fedf08e697ead550c846c68e52d66 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.openflowplugin.api.openflow.rpc.listener.ItemLifecycleLi
 public interface ItemLifeCycleSource {
 
     /**
+     * lifecycle changes.
      * @param itemLifecycleListener acts upon lifecycle changes
      */
     void setItemLifecycleListener(@Nullable ItemLifecycleListener itemLifecycleListener);
index aff71e6ea7218eac37c39240734be66632288fd3..880a59bf3ee81c3d58fc5769f9d7f53e183d039c 100644 (file)
@@ -15,12 +15,13 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * This context is registered with MD-SAL as a routed RPC provider for the inventory node backed by this switch and
  * tracks the state of any user requests and how they map onto protocol requests. It uses
  * {@link org.opendaylight.openflowplugin.api.openflow.device.RequestContext} to perform requests.
- * <p>
  */
 public interface RpcContext extends RequestContextStack, OFPContext {
+
     <S extends RpcService> void registerRpcServiceImplementation(Class<S> serviceClass, S serviceInstance);
 
     <S extends RpcService> S lookupRpcService(Class<S> serviceClass);
+
     <S extends RpcService> void unregisterRpcServiceImplementation(Class<S> serviceClass);
 
 }
index 7598ed8a7d957a5882b51a213578c914ee445261..42e7440cef3a76e26116b8ad0a2b3469bbebcc51 100644 (file)
@@ -22,7 +22,6 @@ public interface RpcManager extends OFPManager {
 
     void setRpcRequestQuota(int rpcRequestQuota);
 
-    RpcContext createContext(final @Nonnull DeviceInfo deviceInfo,
-                             final @Nonnull DeviceContext deviceContext);
+    RpcContext createContext(@Nonnull DeviceInfo deviceInfo, @Nonnull DeviceContext deviceContext);
 
 }
index 8d0e60485034d58241e90c054050df80e11640d7..15180757b7b762d32c23dc7b46bfaeeb56c1d963 100644 (file)
@@ -19,27 +19,30 @@ import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 public interface ItemLifecycleListener {
 
     /**
-     * react upon item added event
+     * react upon item added event.
      *
      * @param itemPath keyed path in DS
      * @param itemBody item body
      */
 
-    <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onAdded(KeyedInstanceIdentifier<I, K> itemPath, I itemBody);
+    <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onAdded(
+            KeyedInstanceIdentifier<I, K> itemPath, I itemBody);
 
     /**
-     * react upon item removed event
+     * react upon item removed event.
      *
      * @param itemPath keyed path in DS
      */
-    <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onRemoved(KeyedInstanceIdentifier<I, K> itemPath);
+    <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onRemoved(
+            KeyedInstanceIdentifier<I, K> itemPath);
 
     /**
-     * react upon item updated event
+     * react upon item updated event.
      *
      * @param itemPath keyed path in DS
      * @param itemBody item body
      */
 
-    <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onUpdated(KeyedInstanceIdentifier<I, K> itemPath, I itemBody);
+    <I extends Identifiable<K> & DataObject, K extends Identifier<I>> void onUpdated(
+            KeyedInstanceIdentifier<I, K> itemPath, I itemBody);
 }
index d61b41670f436f1f36886f2931bac0af5fce5754..e52044b63c1de8f838baeba9058e46bf0dacee7e 100644 (file)
@@ -11,11 +11,12 @@ package org.opendaylight.openflowplugin.api.openflow.statistics;
 import java.util.List;
 
 /**
- * simple message counters dumper
+ * simple message counters dumper.
  */
 public interface MessageCountDumper {
 
     /**
+     * List of counter items.
      * @return list of counter items
      */
     List<String> dumpMessageCounts();
index 35756502561c0b852dec7ec8bd2cc9ba8373cd3e..4868b11480eb74aa0f40ef15860de42e40d5ff32 100644 (file)
@@ -9,9 +9,6 @@
 package org.opendaylight.openflowplugin.api.openflow.statistics;
 
 
-/**
- * @param <M> message type
- */
 @Deprecated
 public interface MessageObservatory<M> extends MessageSpy<M>, MessageCountDumper {
 
index e678adba0daff0565c4a6d68f29710b78c2b50b9..46b9193775f94ec41776b25876f7e0a9e69509b4 100644 (file)
@@ -10,55 +10,77 @@ package org.opendaylight.openflowplugin.api.openflow.statistics;
 
 
 /**
- * ticket spy - aimed on collecting intel about tickets 
+ * ticket spy - aimed on collecting intel about tickets.
  * @param <M> type of watched message
  */
 @Deprecated
 public interface MessageSpy<M> extends Runnable {
 
     /**
+     * Spy In.
      * @param message content of ticket
      */
     void spyIn(M message);
 
     /**
+     * Spy Out.
      * @param message content of ticket
      */
     void spyOut(M message);
-    
-    
+
     // TODO: temporary solution, should be refactored and moved to managed bean
-    
+
     /**
-     * statistic groups overall in OFPlugin
+     * statistic groups overall in OFPlugin.
      */
-    enum STATISTIC_GROUP {
-        /** message from switch, enqueued for processing */
+    enum StatisticsGroup {
+        /**
+         * message from switch, enqueued for processing.
+         */
         FROM_SWITCH_ENQUEUED,
-        /** message from switch translated successfully - source */
+        /**
+         * message from switch translated successfully - source.
+         */
         FROM_SWITCH_TRANSLATE_IN_SUCCESS,
-        /** message from switch translated successfully - target */
+        /**
+         * message from switch translated successfully - target.
+         */
         FROM_SWITCH_TRANSLATE_OUT_SUCCESS,
-        /** message from switch where translation failed - source */
+        /**
+         * message from switch where translation failed - source.
+         */
         FROM_SWITCH_TRANSLATE_SRC_FAILURE,
-        /** message from switch finally published into MD-SAL */
+        /**
+         * message from switch finally published into MD-SAL.
+         */
         FROM_SWITCH_PUBLISHED_SUCCESS,
-        /** message from switch - publishing into MD-SAL failed */
+        /**
+         * message from switch - publishing into MD-SAL failed.
+         */
         FROM_SWITCH_PUBLISHED_FAILURE,
-        
-        /** message from MD-SAL to switch via RPC enqueued */
+
+        /**
+         * message from MD-SAL to switch via RPC enqueued.
+         */
         TO_SWITCH_ENQUEUED_SUCCESS,
-        /** message from MD-SAL to switch via RPC NOT enqueued */
+        /**
+         * message from MD-SAL to switch via RPC NOT enqueued.
+         */
         TO_SWITCH_ENQUEUED_FAILED,
-        /** message from MD-SAL to switch - sent to OFJava successfully */
+        /**
+         * message from MD-SAL to switch - sent to OFJava successfully.
+         */
         TO_SWITCH_SUBMITTED_SUCCESS,
-        /** message from MD-SAL to switch - sent to OFJava but failed*/
+        /**
+         * message from MD-SAL to switch - sent to OFJava but failed.
+         */
         TO_SWITCH_SUBMITTED_FAILURE
     }
-    
+
     /**
+     * Spy message.
      * @param message from switch or to switch - depends on statGroup
-     * @param statGroup 
+     * @param statGroup statistics group
      */
-    void spyMessage(M message, STATISTIC_GROUP statGroup);
-    }
+    void spyMessage(M message, StatisticsGroup statGroup);
+}
index 6d78b843d22cef78c47cf61d87c87468d5d70fdb..1c1e6276587aab16c2678415da99b72fa2a22d5a 100644 (file)
@@ -17,12 +17,12 @@ import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
 import org.opendaylight.openflowplugin.api.openflow.rpc.listener.ItemLifecycleListener;
 
 /**
- * Context for statistics
+ * Context for statistics.
  */
 public interface StatisticsContext extends RequestContextStack, OFPContext {
 
     /**
-     * Gather data from device
+     * Gather data from device.
      * @return true if gathering was successful
      */
     ListenableFuture<Boolean> gatherDynamicData();
@@ -38,41 +38,43 @@ public interface StatisticsContext extends RequestContextStack, OFPContext {
     void statListForCollectingInitialization();
 
     /**
+     * Setter.
      * @param pollTimeout handle to nearest scheduled statistics poll
      */
     void setPollTimeout(Timeout pollTimeout);
 
     /**
+     * Getter.
      * @return dedicated item life cycle change listener (per device)
      */
     ItemLifecycleListener getItemLifeCycleListener();
 
     /**
-     * On / Off scheduling
+     * On / Off scheduling.
      * @param schedulingEnabled true if scheduling should be enabled
      */
-    void setSchedulingEnabled(final boolean schedulingEnabled);
+    void setSchedulingEnabled(boolean schedulingEnabled);
 
     /**
-     * Check status
+     * Check status.
      * @return true if scheduling is enabled
      */
     boolean isSchedulingEnabled();
 
     /**
-     * Gain device state
+     * Gain device state.
      * @return device state from device context from lifecycle service
      */
     DeviceState gainDeviceState();
 
     /**
-     * Gain device context
+     * Gain device context.
      * @return device context from lifecycle service
      */
     DeviceContext gainDeviceContext();
 
     /**
-     * In case to change mastership to slave or connection interrupted stop the future and release thread
+     * In case to change mastership to slave or connection interrupted stop the future and release thread.
      */
     void stopGatheringData();
 }
index b1b8ea52eca630b11d2e57160a32de3db96a0452..faa66f9f51f3b6245e67908006b13109c3b9d3a4 100644 (file)
@@ -14,31 +14,31 @@ import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 
 /**
- * Manager to start or stop scheduling statistics
+ * Manager to start or stop scheduling statistics.
  */
 public interface StatisticsManager extends OFPManager {
 
     /**
-     * Start scheduling statistic gathering for given device info
+     * Start scheduling statistic gathering for given device info.
      * @param deviceInfo for this device should be running statistics gathering
      */
-    void startScheduling(final DeviceInfo deviceInfo);
+    void startScheduling(DeviceInfo deviceInfo);
 
     /**
-     * Stop scheduling statistic gathering for given device info
+     * Stop scheduling statistic gathering for given device info.
      * @param deviceInfo for this device should be stopped statistics gathering
      */
-    void stopScheduling(final DeviceInfo deviceInfo);
+    void stopScheduling(DeviceInfo deviceInfo);
 
     @Override
     void close();
 
     void setIsStatisticsPollingOn(boolean isStatisticsPollingOn);
 
-    void setBasicTimerDelay(final long basicTimerDelay);
+    void setBasicTimerDelay(long basicTimerDelay);
 
-    void setMaximumTimerDelay(final long maximumTimerDelay);
+    void setMaximumTimerDelay(long maximumTimerDelay);
 
-    StatisticsContext createContext(@Nonnull final DeviceContext deviceContext);
+    StatisticsContext createContext(@Nonnull DeviceContext deviceContext);
 
 }
index 924a7571211cf2566b870c69d8c1996fd8ea9f73..c6f96a20334d968f9dacc03f275822ad54dc8609 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 
 /**
  * Prescribes handling and transforming of backward compatible services in order to provide simple to use service
- * with notification support
+ * with notification support.
  *
  * @param <O> rpc input
  * @param <I> rpc input
@@ -24,7 +24,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 public interface BackwardCompatibleAtomicService<I, O> {
 
     /**
-     * process rpc request and publish corresponding notification upon success
+     * process rpc request and publish corresponding notification upon success.
      *
      * @param input                      rpc input
      * @param notificationPublishService publisher handle
index 72bb7dfdc589eef3524c29688f29ff7ce70a463c..129a5ed87f4e3579e16074faec88b1901315d6da 100644 (file)
@@ -9,11 +9,12 @@
 package org.opendaylight.openflowplugin.api.openflow.statistics.compatibility;
 
 /**
- * Simple delegator pattern support
+ * Simple delegator pattern support.
  */
 public interface Delegator<D> {
 
     /**
+     * Setter.
      * @param delegate backend task executor
      */
     void setDelegate(D delegate);
index 9a8cbbb9243434569af3e1a0b4f7b7566c0a415c..f303e01075081dfaff6d24406486558d84d2d32c 100644 (file)
@@ -10,11 +10,9 @@ package org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific;
 
 import java.util.List;
 
-/**
- * Created by Martin Bobak &lt;mbobak@cisco.com&gt; on 20.4.2015.
- */
 public interface MessageIntelligenceAgency extends MessageSpy {
 
     List<String> provideIntelligence();
+
     void resetStatistics();
 }
index 14637b17fb3fc246d40843f2e09ea8456c308b2e..a199d9b12755eea505bd3d3aa5824f3bcdaae47e 100644 (file)
@@ -8,50 +8,47 @@
 
 package org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific;
 
-/**
- * Created by Martin Bobak &lt;mbobak@cisco.com&gt; on 20.4.2015.
- */
 public interface MessageSpy extends Runnable {
 
     /**
-     * statistic groups overall in OFPlugin
+     * statistic groups overall in OFPlugin.
      */
-    enum STATISTIC_GROUP {
+    enum StatisticsGroup {
         /**
-         * message from switch
+         * message from switch.
          */
         FROM_SWITCH,
         /**
-         * message from switch translated successfully - source
+         * message from switch translated successfully - source.
          */
         FROM_SWITCH_TRANSLATE_IN_SUCCESS,
         /**
-         * message from switch translated successfully - target
+         * message from switch translated successfully - target.
          */
         FROM_SWITCH_TRANSLATE_OUT_SUCCESS,
         /**
-         * message from switch where translation failed - source
+         * message from switch where translation failed - source.
          */
         FROM_SWITCH_TRANSLATE_SRC_FAILURE,
         /**
-         * packetIn from switch reached processing limit and got dropped
+         * packetIn from switch reached processing limit and got dropped.
          */
         FROM_SWITCH_PACKET_IN_LIMIT_REACHED_AND_DROPPED,
         /**
-         * message from switch to MD-SAL  - notification service rejected notfication
+         * message from switch to MD-SAL  - notification service rejected notification.
          */
         FROM_SWITCH_NOTIFICATION_REJECTED,
         /**
-         * message from switch finally published into MD-SAL
+         * message from switch finally published into MD-SAL.
          */
         FROM_SWITCH_PUBLISHED_SUCCESS,
         /**
-         * message from switch - publishing into MD-SAL failed
+         * message from switch - publishing into MD-SAL failed.
          */
         FROM_SWITCH_PUBLISHED_FAILURE,
 
         /**
-         * message from MD-SAL entered service - first point of encounter
+         * message from MD-SAL entered service - first point of encounter.
          */
         TO_SWITCH_ENTERED,
         /**
@@ -59,39 +56,40 @@ public interface MessageSpy extends Runnable {
          */
         TO_SWITCH_DISREGARDED,
         /**
-         * message from MD-SAL to switch - asked for XID reservation in queue, but rejected
+         * message from MD-SAL to switch - asked for XID reservation in queue, but rejected.
          */
         TO_SWITCH_RESERVATION_REJECTED,
         /**
-         * message from MD-SAL to switch - ready to sent to OFJava (might be one-to-multiple ration between entered and sent)
+         * message from MD-SAL to switch
+         * - ready to sent to OFJava (might be one-to-multiple ration between entered and sent).
          */
         TO_SWITCH_READY_FOR_SUBMIT,
         /**
-         * message from MD-SAL to switch - sent to OFJava successfully
+         * message from MD-SAL to switch - sent to OFJava successfully.
          */
         TO_SWITCH_SUBMIT_SUCCESS,
         /**
-         * message from MD-SAL to switch - sent to OFJava successfully, no response expected
+         * message from MD-SAL to switch - sent to OFJava successfully, no response expected.
          */
         TO_SWITCH_SUBMIT_SUCCESS_NO_RESPONSE,
         /**
-         * message from MD-SAL to switch - sent to OFJava but failed
+         * message from MD-SAL to switch - sent to OFJava but failed.
          */
         TO_SWITCH_SUBMIT_FAILURE,
         /**
-         * message from MD-SAL to switch - sent to OFJava but failed with exception
+         * message from MD-SAL to switch - sent to OFJava but failed with exception.
          */
         TO_SWITCH_SUBMIT_ERROR,
         /**
-         * TEMPORARY STATISTIC VALUE
+         * TEMPORARY STATISTIC VALUE.
          */
         REQUEST_STACK_FREED,
         /**
-         * stop receiving data from device - turned on
+         * stop receiving data from device - turned on.
          */
         OFJ_BACKPRESSURE_ON,
         /**
-         * stop receiving data from device - turned off
+         * stop receiving data from device - turned off.
          */
         OFJ_BACKPRESSURE_OFF
 
@@ -99,9 +97,10 @@ public interface MessageSpy extends Runnable {
     }
 
     /**
+     *Spy message.
      * @param message   from switch or to switch - depends on statGroup
-     * @param statGroup
+     * @param statGroup statistics group
      */
-    void spyMessage(Class<?> message, STATISTIC_GROUP statGroup);
+    void spyMessage(Class<?> message, StatisticsGroup statGroup);
 
 }
index 70164a34c67f3924dfc84b97696a57757f7b051f..f8d8b65b1f1f773020d4d262c6bb357f1a0eaceb 100644 (file)
@@ -10,22 +10,18 @@ package org.opendaylight.openflowplugin.api.openflow.translator;
 
 import org.opendaylight.openflowplugin.api.openflow.device.TranslatorLibrary;
 
-/**
- * Created by Martin Bobak &lt;mbobak@cisco.com&gt; on 3.4.2015.
- */
 public interface TranslatorLibrarian {
 
     /**
      * Method provides translator library held by Librarian.
-     * @return
+     * @return translator library
      */
-    public TranslatorLibrary oook();
+    TranslatorLibrary oook();
 
     /**
      * Method registers translator library for translating message objects.
-     *
-     * @param translatorLibrary
+     * @param translatorLibrary translator library
      */
-    public void setTranslatorLibrary(TranslatorLibrary translatorLibrary);
+    void setTranslatorLibrary(TranslatorLibrary translatorLibrary);
 
 }
index 03543a877c4a8e06d45ecfbc906dd58a7cee4183..c7141da52bc8e95d05d56b4ec0ffd811be38e4b9 100644 (file)
@@ -168,7 +168,7 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
     private boolean switchFeaturesMandatory;
     private DeviceInfo deviceInfo;
     private final ConvertorExecutor convertorExecutor;
-    private volatile CONTEXT_STATE state;
+    private volatile ContextState state;
     private ClusterInitializationPhaseHandler clusterInitializationPhaseHandler;
     private final DeviceManager myManager;
     private final DeviceInitializerProvider deviceInitializerProvider;
@@ -212,7 +212,7 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
         this.itemLifeCycleSourceRegistry = new ItemLifeCycleRegistryImpl();
         this.flowLifeCycleKeeper = new ItemLifeCycleSourceImpl();
         this.itemLifeCycleSourceRegistry.registerLifeCycleSource(flowLifeCycleKeeper);
-        this.state = CONTEXT_STATE.INITIALIZATION;
+        this.state = ContextState.INITIALIZATION;
         this.convertorExecutor = convertorExecutor;
         this.skipTableFeatures = skipTableFeatures;
         this.useSingleLayerSerialization = useSingleLayerSerialization;
@@ -319,8 +319,8 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
         messageSpy.spyMessage(
                 ofHeader.getImplementedInterface(),
                 (ofHeader instanceof Error)
-                        ? MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_FAILURE
-                        : MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS);
+                        ? MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE
+                        : MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS);
     }
 
     @Override
@@ -328,8 +328,8 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
         ofHeaderList.forEach(header -> messageSpy.spyMessage(
                 header.getImplementedInterface(),
                 (header instanceof Error)
-                        ? MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_FAILURE
-                        : MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS));
+                        ? MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE
+                        : MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
     }
 
     @Override
@@ -369,7 +369,7 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
 
     @Override
     public void processPortStatusMessage(final PortStatusMessage portStatus) {
-        messageSpy.spyMessage(portStatus.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS);
+        messageSpy.spyMessage(portStatus.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS);
 
         if (initialized) {
             try {
@@ -410,29 +410,29 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
 
     @Override
     public void processPacketInMessage(final PacketInMessage packetInMessage) {
-        messageSpy.spyMessage(packetInMessage.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH);
+        messageSpy.spyMessage(packetInMessage.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH);
         final ConnectionAdapter connectionAdapter = getPrimaryConnectionContext().getConnectionAdapter();
         final PacketReceived packetReceived = packetInTranslator.translate(packetInMessage, getDeviceInfo(), null);
 
         if (packetReceived == null) {
             LOG.debug("Received a null packet from switch {}", connectionAdapter.getRemoteAddress());
-            messageSpy.spyMessage(packetInMessage.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH_TRANSLATE_SRC_FAILURE);
+            messageSpy.spyMessage(packetInMessage.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH_TRANSLATE_SRC_FAILURE);
             return;
         } else {
-            messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH_TRANSLATE_OUT_SUCCESS);
+            messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH_TRANSLATE_OUT_SUCCESS);
         }
 
         if (!packetInLimiter.acquirePermit()) {
             LOG.debug("Packet limited");
             // TODO: save packet into emergency slot if possible
-            messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PACKET_IN_LIMIT_REACHED_AND_DROPPED);
+            messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH_PACKET_IN_LIMIT_REACHED_AND_DROPPED);
             return;
         }
 
         final ListenableFuture<?> offerNotification = notificationPublishService.offerNotification(packetReceived);
         if (NotificationPublishService.REJECTED.equals(offerNotification)) {
             LOG.debug("notification offer rejected");
-            messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH_NOTIFICATION_REJECTED);
+            messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH_NOTIFICATION_REJECTED);
             packetInLimiter.drainLowWaterMark();
             packetInLimiter.releasePermit();
             return;
@@ -441,13 +441,13 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
         Futures.addCallback(offerNotification, new FutureCallback<Object>() {
             @Override
             public void onSuccess(final Object result) {
-                messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS);
+                messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS);
                 packetInLimiter.releasePermit();
             }
 
             @Override
             public void onFailure(final Throwable t) {
-                messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.STATISTIC_GROUP.FROM_SWITCH_NOTIFICATION_REJECTED);
+                messageSpy.spyMessage(packetReceived.getImplementedInterface(), MessageSpy.StatisticsGroup.FROM_SWITCH_NOTIFICATION_REJECTED);
                 LOG.debug("notification offer failed: {}", t.getMessage());
                 LOG.trace("notification offer failed..", t);
                 packetInLimiter.releasePermit();
@@ -510,8 +510,8 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
 
     @Override
     public void onPublished() {
-        Verify.verify(CONTEXT_STATE.INITIALIZATION.equals(getState()));
-        this.state = CONTEXT_STATE.WORKING;
+        Verify.verify(ContextState.INITIALIZATION.equals(getState()));
+        this.state = ContextState.WORKING;
         primaryConnectionContext.getConnectionAdapter().setPacketInFiltering(false);
     }
 
@@ -545,7 +545,7 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
         if (LOG.isDebugEnabled()) {
             LOG.debug("Shutdown method for node {}", getDeviceInfo().getLOGValue());
         }
-        if (CONTEXT_STATE.TERMINATION.equals(getState())) {
+        if (ContextState.TERMINATION.equals(getState())) {
             LOG.debug("DeviceCtx for Node {} is in termination process.", getDeviceInfo().getLOGValue());
             return;
         }
@@ -590,7 +590,7 @@ public class DeviceContextImpl implements DeviceContext, ExtensionConverterProvi
     }
 
     @Override
-    public CONTEXT_STATE getState() {
+    public ContextState getState() {
         return this.state;
     }
 
index ad0a8b1b741648bd54e35bd242b77b45381a17b3..dae48def27c5c90d9271bf818defd77e62450628 100644 (file)
@@ -30,14 +30,14 @@ final class PacketInRateLimiter extends SimpleRatelimiter {
 
     @Override
     protected void disableFlow() {
-        messageSpy.spyMessage(DeviceContext.class, MessageSpy.STATISTIC_GROUP.OFJ_BACKPRESSURE_ON);
+        messageSpy.spyMessage(DeviceContext.class, MessageSpy.StatisticsGroup.OFJ_BACKPRESSURE_ON);
         connectionAdapter.setPacketInFiltering(true);
         LOG.debug("PacketIn filtering on: {}", connectionAdapter.getRemoteAddress());
     }
 
     @Override
     protected void enableFlow() {
-        messageSpy.spyMessage(DeviceContext.class, MessageSpy.STATISTIC_GROUP.OFJ_BACKPRESSURE_OFF);
+        messageSpy.spyMessage(DeviceContext.class, MessageSpy.StatisticsGroup.OFJ_BACKPRESSURE_OFF);
         connectionAdapter.setPacketInFiltering(false);
         LOG.debug("PacketIn filtering off: {}", connectionAdapter.getRemoteAddress());
     }
index 2bb0cbee8d6b9b4eb9fa6ac5f014dbe1c2f1c429..7d21f862cb11bc083e2a3cd62bc42d06f920e740 100644 (file)
@@ -16,7 +16,6 @@ import java.util.Iterator;
 import java.util.Map.Entry;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Semaphore;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -51,7 +50,7 @@ class RpcContextImpl implements RpcContext {
     // TODO: add private Sal salBroker
     private final ConcurrentMap<Class<?>, RoutedRpcRegistration<?>> rpcRegistrations = new ConcurrentHashMap<>();
     private final KeyedInstanceIdentifier<Node, NodeKey> nodeInstanceIdentifier;
-    private volatile CONTEXT_STATE state = CONTEXT_STATE.INITIALIZATION;
+    private volatile ContextState state = ContextState.INITIALIZATION;
     private final DeviceInfo deviceInfo;
     private final DeviceContext deviceContext;
     private final ExtensionConverterProvider extensionConverterProvider;
@@ -135,7 +134,7 @@ class RpcContextImpl implements RpcContext {
                 tracker.release();
                 final long xid = getXid().getValue();
                 LOG.trace("Removed request context with xid {}", xid);
-                messageSpy.spyMessage(RpcContextImpl.class, MessageSpy.STATISTIC_GROUP.REQUEST_STACK_FREED);
+                messageSpy.spyMessage(RpcContextImpl.class, MessageSpy.StatisticsGroup.REQUEST_STACK_FREED);
             }
         };
     }
@@ -157,7 +156,7 @@ class RpcContextImpl implements RpcContext {
     }
 
     @Override
-    public CONTEXT_STATE getState() {
+    public ContextState getState() {
         return this.state;
     }
 
@@ -173,7 +172,7 @@ class RpcContextImpl implements RpcContext {
 
     @Override
     public ListenableFuture<Void> stopClusterServices() {
-        if (CONTEXT_STATE.TERMINATION.equals(this.state)) {
+        if (ContextState.TERMINATION.equals(this.state)) {
             return Futures.immediateCancelledFuture();
         }
 
index c4c5a90851a460e59a42177163c361a417f54128..1277c78f2260e9e4bb24358546819a38c3ba832d 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowplugin.impl.services;
 import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
-import org.opendaylight.openflowplugin.api.openflow.OFPContext.CONTEXT_STATE;
+import org.opendaylight.openflowplugin.api.openflow.OFPContext.ContextState;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceRegistry;
@@ -39,7 +39,7 @@ public abstract class AbstractMultipartRequestOnTheFlyCallback<T extends OfHeade
     private final TxFacade txFacade;
     private final MultipartWriterProvider statisticsWriterProvider;
     private final DeviceRegistry deviceRegistry;
-    private volatile CONTEXT_STATE gatheringState = CONTEXT_STATE.INITIALIZATION;
+    private volatile ContextState gatheringState = ContextState.INITIALIZATION;
     private ConvertorExecutor convertorExecutor;
 
     public AbstractMultipartRequestOnTheFlyCallback(final RequestContext<List<T>> context, Class<?> requestType,
@@ -62,12 +62,12 @@ public abstract class AbstractMultipartRequestOnTheFlyCallback<T extends OfHeade
         if (Objects.isNull(result)) {
             LOG.warn("Response received was null.");
 
-            if (!CONTEXT_STATE.TERMINATION.equals(gatheringState)) {
+            if (!ContextState.TERMINATION.equals(gatheringState)) {
                 endCollecting(true);
             }
 
             return;
-        } else if (CONTEXT_STATE.TERMINATION.equals(gatheringState)) {
+        } else if (ContextState.TERMINATION.equals(gatheringState)) {
             LOG.warn("Unexpected response received: xid={}, {}", result.getXid(), result.getImplementedInterface());
             return;
         }
@@ -80,7 +80,7 @@ public abstract class AbstractMultipartRequestOnTheFlyCallback<T extends OfHeade
         } else {
             final T resultCast = (T) result;
 
-            if (CONTEXT_STATE.INITIALIZATION.equals(gatheringState)) {
+            if (ContextState.INITIALIZATION.equals(gatheringState)) {
                 startCollecting();
             }
 
@@ -124,7 +124,7 @@ public abstract class AbstractMultipartRequestOnTheFlyCallback<T extends OfHeade
      */
     private synchronized void startCollecting() {
         EventsTimeCounter.markStart(doneEventIdentifier);
-        gatheringState = CONTEXT_STATE.WORKING;
+        gatheringState = ContextState.WORKING;
 
         final InstanceIdentifier<FlowCapableNode> instanceIdentifier = deviceInfo
                 .getNodeInstanceIdentifier()
@@ -157,10 +157,10 @@ public abstract class AbstractMultipartRequestOnTheFlyCallback<T extends OfHeade
      * @param setResult set empty success result
      */
     private void endCollecting(final boolean setResult) {
-        gatheringState = CONTEXT_STATE.TERMINATION;
+        gatheringState = ContextState.TERMINATION;
         EventsTimeCounter.markEnd(doneEventIdentifier);
         EventsTimeCounter.markEnd(getEventIdentifier());
-        spyMessage(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_TRANSLATE_OUT_SUCCESS);
+        spyMessage(MessageSpy.StatisticsGroup.FROM_SWITCH_TRANSLATE_OUT_SUCCESS);
 
         if (setResult) {
             setResult(RpcResultBuilder.success(Collections.<T>emptyList()).build());
index 484fbd85d01d070b28d7af02b28741ca59a79b11..4e442881780b253a7b2c12bb7eedc2831c48603b 100644 (file)
@@ -15,7 +15,7 @@ import org.opendaylight.openflowjava.protocol.api.connection.DeviceRequestFailed
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy;
-import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy.STATISTIC_GROUP;
+import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy.StatisticsGroup;
 import org.opendaylight.openflowplugin.impl.services.util.RequestContextUtil;
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.Error;
@@ -45,7 +45,7 @@ public abstract class AbstractRequestCallback<T> implements FutureCallback<OfHea
         context.close();
     }
 
-    protected final void spyMessage(@Nonnull final STATISTIC_GROUP group) {
+    protected final void spyMessage(@Nonnull final StatisticsGroup group) {
         spy.spyMessage(requestType, Preconditions.checkNotNull(group));
     }
 
@@ -64,10 +64,10 @@ public abstract class AbstractRequestCallback<T> implements FutureCallback<OfHea
             final String errorString = String.format("Device reported error type %s code %s", err.getTypeString(), err.getCodeString());
 
             builder = RpcResultBuilder.<T>failed().withError(RpcError.ErrorType.APPLICATION, errorString, t);
-            spyMessage(MessageSpy.STATISTIC_GROUP.TO_SWITCH_SUBMIT_FAILURE);
+            spyMessage(StatisticsGroup.TO_SWITCH_SUBMIT_FAILURE);
         } else {
             builder = RpcResultBuilder.<T>failed().withError(RpcError.ErrorType.APPLICATION, t.getMessage(), t);
-            spyMessage(MessageSpy.STATISTIC_GROUP.TO_SWITCH_SUBMIT_ERROR);
+            spyMessage(StatisticsGroup.TO_SWITCH_SUBMIT_ERROR);
         }
 
         context.setResult(builder.build());
index 3c267c9b42ef2db5655d2458320641c1dad002f8..8a8486944c84eb202fe1e68e23e7ddefe9846f72 100644 (file)
@@ -118,14 +118,14 @@ public abstract class AbstractService<I, O> {
             ? DataContainer.class.cast(input).getImplementedInterface()
             : input.getClass();
 
-        getMessageSpy().spyMessage(requestType, MessageSpy.STATISTIC_GROUP.TO_SWITCH_ENTERED);
+        getMessageSpy().spyMessage(requestType, MessageSpy.StatisticsGroup.TO_SWITCH_ENTERED);
 
         LOG.trace("Handling general service call");
         final RequestContext<O> requestContext = requestContextStack.createRequestContext();
 
         if (Objects.isNull(requestContext)) {
             LOG.trace("Request context refused.");
-            getMessageSpy().spyMessage(AbstractService.class, MessageSpy.STATISTIC_GROUP.TO_SWITCH_DISREGARDED);
+            getMessageSpy().spyMessage(AbstractService.class, MessageSpy.StatisticsGroup.TO_SWITCH_DISREGARDED);
             return Futures.immediateFuture(RpcResultBuilder
                     .<O>failed()
                     .withError(RpcError.ErrorType.APPLICATION, "", "Request quota exceeded")
@@ -133,11 +133,11 @@ public abstract class AbstractService<I, O> {
         }
 
         if (Objects.isNull(requestContext.getXid())) {
-            getMessageSpy().spyMessage(requestContext.getClass(), MessageSpy.STATISTIC_GROUP.TO_SWITCH_RESERVATION_REJECTED);
+            getMessageSpy().spyMessage(requestContext.getClass(), MessageSpy.StatisticsGroup.TO_SWITCH_RESERVATION_REJECTED);
             return RequestContextUtil.closeRequestContextWithRpcError(requestContext, "Outbound queue wasn't able to reserve XID.");
         }
 
-        getMessageSpy().spyMessage(requestContext.getClass(), MessageSpy.STATISTIC_GROUP.TO_SWITCH_READY_FOR_SUBMIT);
+        getMessageSpy().spyMessage(requestContext.getClass(), MessageSpy.StatisticsGroup.TO_SWITCH_READY_FOR_SUBMIT);
 
         final Xid xid = requestContext.getXid();
         OfHeader request = null;
index 3f94add0070f014160fe4fd363b335f628b17490..ad08aad92f3ad5ef06b90162eacbeeacb495b8d8 100644 (file)
@@ -32,7 +32,7 @@ public final class SimpleRequestCallback<T extends DataObject> extends AbstractR
 
     @Override
     public final void onSuccess(final OfHeader result) {
-        spyMessage(MessageSpy.STATISTIC_GROUP.TO_SWITCH_SUBMIT_SUCCESS);
+        spyMessage(MessageSpy.StatisticsGroup.TO_SWITCH_SUBMIT_SUCCESS);
 
         if (result == null) {
             setResult(RpcResultBuilder.<T>success().build());
index 97109ad40197702e82002374e777956e7447b473..94dc3d1a581eab853f3d9019be3a71cdd02e9290 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.openflowplugin.impl.services;
 
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy;
-import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy.STATISTIC_GROUP;
+import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy.StatisticsGroup;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@@ -23,7 +23,7 @@ public final class VoidRequestCallback extends AbstractRequestCallback<Void> {
 
     @Override
     public void onSuccess(final OfHeader result) {
-        spyMessage(STATISTIC_GROUP.TO_SWITCH_SUBMIT_SUCCESS_NO_RESPONSE);
+        spyMessage(StatisticsGroup.TO_SWITCH_SUBMIT_SUCCESS_NO_RESPONSE);
         setResult(SUCCESS);
     }
 }
index b7f37dbd3fb48215824a4f8d2824014daff1e572..99192e2abe38c6ac0cbe5b322528e079bd3339cb 100644 (file)
@@ -76,7 +76,7 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
     private final StatisticsManager myManager;
 
     private volatile boolean schedulingEnabled;
-    private volatile CONTEXT_STATE state;
+    private volatile ContextState state;
     private ClusterInitializationPhaseHandler clusterInitializationPhaseHandler;
     private ClusterInitializationPhaseHandler initialSubmitHandler;
 
@@ -96,7 +96,7 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
             deviceContext, convertorExecutor, statisticsWriterProvider);
         itemLifeCycleListener = new ItemLifecycleListenerImpl(deviceContext);
         statListForCollectingInitialization();
-        this.state = CONTEXT_STATE.INITIALIZATION;
+        this.state = ContextState.INITIALIZATION;
         this.deviceInfo = deviceContext.getDeviceInfo();
         this.myManager = myManager;
         this.lastDataGathering = null;
@@ -222,12 +222,12 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
 
     @Override
     public void close() {
-        if (CONTEXT_STATE.TERMINATION.equals(getState())) {
+        if (ContextState.TERMINATION.equals(getState())) {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("StatisticsContext for node {} is already in TERMINATION state.", getDeviceInfo().getLOGValue());
             }
         } else {
-            this.state = CONTEXT_STATE.TERMINATION;
+            this.state = ContextState.TERMINATION;
             stopGatheringData();
 
             for (final Iterator<RequestContext<?>> iterator = Iterators.consumingIterator(requestContexts.iterator());
@@ -308,7 +308,7 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
     }
 
     @Override
-    public CONTEXT_STATE getState() {
+    public ContextState getState() {
         return this.state;
     }
 
@@ -324,7 +324,7 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext {
 
     @Override
     public ListenableFuture<Void> stopClusterServices() {
-        if (CONTEXT_STATE.TERMINATION.equals(this.state)) {
+        if (ContextState.TERMINATION.equals(this.state)) {
             return Futures.immediateCancelledFuture();
         }
 
index 0ba31bd14ccd8dbcf57b6e79b2cb4f702571b98b..4e7aba7317b377f30f6a8fc9bee5df6454c85fec 100644 (file)
@@ -23,7 +23,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Implementation of {@link org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageIntelligenceAgency}.
- * Class counts message of {@link org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy.STATISTIC_GROUP} type
+ * Class counts message of {@link StatisticsGroup} type
  * and provides info as debug log.
  */
 public class MessageIntelligenceAgencyImpl implements MessageIntelligenceAgency, MessageIntelligenceAgencyMXBean {
@@ -51,10 +51,10 @@ public class MessageIntelligenceAgencyImpl implements MessageIntelligenceAgency,
         }
     }
 
-    private ConcurrentMap<STATISTIC_GROUP, ConcurrentMap<Class<?>, MessageCounters>> inputStats = new ConcurrentHashMap<>();
+    private ConcurrentMap<StatisticsGroup, ConcurrentMap<Class<?>, MessageCounters>> inputStats = new ConcurrentHashMap<>();
 
     @Override
-    public void spyMessage(@Nonnull final Class<?> message, final STATISTIC_GROUP statGroup) {
+    public void spyMessage(@Nonnull final Class<?> message, final StatisticsGroup statGroup) {
         Preconditions.checkNotNull(message, "Message can't be null.");
         getCounters(message, statGroup).increment();
     }
@@ -64,7 +64,7 @@ public class MessageIntelligenceAgencyImpl implements MessageIntelligenceAgency,
      * @param statGroup statistic counter group
      * @return corresponding counter
      */
-    private MessageCounters getCounters(final Class<?> message, final STATISTIC_GROUP statGroup) {
+    private MessageCounters getCounters(final Class<?> message, final StatisticsGroup statGroup) {
         ConcurrentMap<Class<?>, MessageCounters> groupData = getOrCreateGroupData(statGroup);
         MessageCounters counters = getOrCreateCountersPair(message, groupData);
         return counters;
@@ -82,7 +82,7 @@ public class MessageIntelligenceAgencyImpl implements MessageIntelligenceAgency,
 
     }
 
-    private ConcurrentMap<Class<?>, MessageCounters> getOrCreateGroupData(final STATISTIC_GROUP statGroup) {
+    private ConcurrentMap<Class<?>, MessageCounters> getOrCreateGroupData(final StatisticsGroup statGroup) {
         final ConcurrentMap<Class<?>, MessageCounters> lookup = inputStats.get(statGroup);
         if (lookup != null) {
             return lookup;
@@ -108,7 +108,7 @@ public class MessageIntelligenceAgencyImpl implements MessageIntelligenceAgency,
     public List<String> provideIntelligence() {
         List<String> dump = new ArrayList<>();
 
-        for (STATISTIC_GROUP statGroup : STATISTIC_GROUP.values()) {
+        for (StatisticsGroup statGroup : StatisticsGroup.values()) {
             Map<Class<?>, MessageCounters> groupData = inputStats.get(statGroup);
             if (groupData != null) {
                 for (Entry<Class<?>, MessageCounters> statEntry : groupData.entrySet()) {
index 207d393e643c77372c9219ded2595d79f9b0706b..b0c98178bbb1cdb0508583cedbd47350f4138542 100644 (file)
@@ -344,10 +344,10 @@ public class DeviceContextImplTest {
     public void testProcessReply() {
         final Error mockedError = mock(Error.class);
         deviceContext.processReply(mockedError);
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_FAILURE));
+        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE));
         final OfHeader mockedOfHeader = mock(OfHeader.class);
         deviceContext.processReply(mockedOfHeader);
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS));
+        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
     }
 
     @Test
@@ -356,11 +356,11 @@ public class DeviceContextImplTest {
 
         final Error mockedError = mock(Error.class);
         deviceContext.processReply(dummyXid, Lists.newArrayList(mockedError));
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_FAILURE));
+        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE));
 
         final MultipartReply mockedMultipartReply = mock(MultipartReply.class);
         deviceContext.processReply(dummyXid, Lists.newArrayList(mockedMultipartReply));
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS));
+        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
     }
 
     @Test
@@ -372,7 +372,7 @@ public class DeviceContextImplTest {
         when(mockedNotificationPublishService.offerNotification(any(PacketReceived.class))).thenReturn(stringListenableFuture);
         deviceContext.setNotificationPublishService(mockedNotificationPublishService);
         deviceContext.processPacketInMessage(mockedPacketInMessage);
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS));
+        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS));
     }
 
     @Test
@@ -384,7 +384,7 @@ public class DeviceContextImplTest {
         when(mockedNotificationPublishService.offerNotification(any(PacketReceived.class))).thenReturn(dummyFuture);
         deviceContext.setNotificationPublishService(mockedNotificationPublishService);
         deviceContext.processPacketInMessage(mockedPacketInMessage);
-        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.STATISTIC_GROUP.FROM_SWITCH_NOTIFICATION_REJECTED));
+        verify(messageSpy).spyMessage(any(Class.class), eq(MessageSpy.StatisticsGroup.FROM_SWITCH_NOTIFICATION_REJECTED));
     }
 
     @Test
index 3b7ba9931618adf74cfc5736e357f726b2f71184..191745c09fa7404f2a9f5264616161b2b728cd74 100644 (file)
@@ -44,7 +44,7 @@ public class PacketInRateLimiterTest {
     public void testDisableFlow() throws Exception {
         rateLimiter.disableFlow();
 
-        Mockito.verify(messageSpy).spyMessage(DeviceContext.class, MessageSpy.STATISTIC_GROUP.OFJ_BACKPRESSURE_ON);
+        Mockito.verify(messageSpy).spyMessage(DeviceContext.class, MessageSpy.StatisticsGroup.OFJ_BACKPRESSURE_ON);
         Mockito.verify(connectionAdapter).setPacketInFiltering(true);
     }
 
@@ -52,7 +52,7 @@ public class PacketInRateLimiterTest {
     public void testEnableFlow() throws Exception {
         rateLimiter.enableFlow();
 
-        Mockito.verify(messageSpy).spyMessage(DeviceContext.class, MessageSpy.STATISTIC_GROUP.OFJ_BACKPRESSURE_OFF);
+        Mockito.verify(messageSpy).spyMessage(DeviceContext.class, MessageSpy.StatisticsGroup.OFJ_BACKPRESSURE_OFF);
         Mockito.verify(connectionAdapter).setPacketInFiltering(false);
     }
 
index 73c99047a4339b5f58d0a179b06f6cd15de9361e..6f0f85f707fed7ec9628c3f4dc1b514f9531290f 100644 (file)
@@ -70,7 +70,7 @@ public class ClearStatsCommandProviderTest extends AbstractKarafTest {
     public void testDoExecute_dirty() throws Exception {
         final MessageIntelligenceAgency mi5 = OpenFlowPluginProviderImpl.getMessageIntelligenceAgency();
         Assert.assertTrue(checkNoActivity(mi5.provideIntelligence(), CHECK_NO_ACTIVITY_FUNCTION));
-        mi5.spyMessage(OfHeader.class, MessageSpy.STATISTIC_GROUP.FROM_SWITCH);
+        mi5.spyMessage(OfHeader.class, MessageSpy.StatisticsGroup.FROM_SWITCH);
         Assert.assertFalse(checkNoActivity(mi5.provideIntelligence(), CHECK_NO_ACTIVITY_FUNCTION));
 
         clearStatsCommandProvider.execute(cmdSession);
index 86a935f64e145852377c056b61948402ae0524b2..29da0da28f693359d1b154248cef443819836c9e 100644 (file)
@@ -71,7 +71,7 @@ public class ShowStatsCommandProviderTest extends AbstractKarafTest {
     public void testDoExecute_dirty() throws Exception {
         Assert.assertTrue(checkNoActivity(messageIntelligenceAgency.provideIntelligence(), CHECK_NO_ACTIVITY_FUNCTION));
 
-        messageIntelligenceAgency.spyMessage(OfHeader.class, MessageSpy.STATISTIC_GROUP.FROM_SWITCH);
+        messageIntelligenceAgency.spyMessage(OfHeader.class, MessageSpy.StatisticsGroup.FROM_SWITCH);
         Assert.assertFalse(checkNoActivity(messageIntelligenceAgency.provideIntelligence(), CHECK_NO_ACTIVITY_FUNCTION));
 
         showStatsCommandProvider.execute(cmdSession);
index 6850c36b72dd8cc368f56d126cb6c364062ae9af..74bfdc3cb8550275bcac9a4d19030618e593091b 100644 (file)
@@ -137,7 +137,7 @@ public class RpcContextImplTest {
             final RequestContext<?> requestContext = rpcContext.createRequestContext();
             assertNotNull(requestContext);
             requestContext.close();
-            verify(messageSpy).spyMessage(RpcContextImpl.class, MessageSpy.STATISTIC_GROUP.REQUEST_STACK_FREED);
+            verify(messageSpy).spyMessage(RpcContextImpl.class, MessageSpy.StatisticsGroup.REQUEST_STACK_FREED);
         }
     }
 
@@ -187,7 +187,7 @@ public class RpcContextImplTest {
     public void testCreateRequestContext2() throws InterruptedException {
         RequestContext temp = rpcContext.createRequestContext();
         temp.close();
-        verify(messageSpy).spyMessage(RpcContextImpl.class,MessageSpy.STATISTIC_GROUP.REQUEST_STACK_FREED);
+        verify(messageSpy).spyMessage(RpcContextImpl.class, MessageSpy.StatisticsGroup.REQUEST_STACK_FREED);
     }
 
     @Test
index 0b0228bc46e3db0f55b579ff1e96418c47207845..f4f40519049e96f366bf227b9375e492f2d420e7 100644 (file)
@@ -19,8 +19,8 @@ public class MessageIntelligenceAgencyImplTest {
     @Test
     public void testMessageIntelligenceAgency() {
         final MessageIntelligenceAgencyImpl messageIntelligenceAgency = new MessageIntelligenceAgencyImpl();
-        messageIntelligenceAgency.spyMessage(String.class, MessageSpy.STATISTIC_GROUP.FROM_SWITCH);
-        messageIntelligenceAgency.spyMessage(Integer.class, MessageSpy.STATISTIC_GROUP.TO_SWITCH_ENTERED);
+        messageIntelligenceAgency.spyMessage(String.class, MessageSpy.StatisticsGroup.FROM_SWITCH);
+        messageIntelligenceAgency.spyMessage(Integer.class, MessageSpy.StatisticsGroup.TO_SWITCH_ENTERED);
         final List<String> intelligence = messageIntelligenceAgency.provideIntelligence();
         findExpectedStatistics(intelligence, "FROM_SWITCH: MSG[String] -> +1 | 1", "TO_SWITCH_ENTERED: MSG[Integer] -> +1 | 1");
     }
index 9b6f40ba1c8200146c9de29e2934dc8ea1ad86f0..c145c5855dea18d0a02f9cfb65bff9052765110b 100644 (file)
@@ -43,13 +43,13 @@ public class NotificationPopListener<T> implements PopListener<T> {
         if(processedMessage instanceof Notification) {
             if (notificationProviderService != null) {
                 notificationProviderService.publish((Notification) processedMessage);
-                messageSpy.spyMessage(processedMessage, MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_SUCCESS);
+                messageSpy.spyMessage(processedMessage, MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_SUCCESS);
                 published = true;
             }
         }
         
         if (! published) {
-            messageSpy.spyMessage(processedMessage, MessageSpy.STATISTIC_GROUP.FROM_SWITCH_PUBLISHED_FAILURE);
+            messageSpy.spyMessage(processedMessage, MessageSpy.StatisticsGroup.FROM_SWITCH_PUBLISHED_FAILURE);
         }
     }
 
index f785a07fdce271d78b338c68b1c9d3aa9a9e39bf..7127d8b586cdf8f7f9d298ac83f7598244cf760a 100644 (file)
@@ -58,13 +58,13 @@ public class RpcListeningExecutorService implements ListeningExecutorService {
         if (task instanceof OFRpcTask<?, ?>) {
             if (((OFRpcTask<?, ?>) task).getInput() instanceof DataContainer) {
                 messageSpy.spyMessage((DataContainer) ((OFRpcTask<?, ?>) task).getInput(), 
-                        MessageSpy.STATISTIC_GROUP.TO_SWITCH_ENQUEUED_SUCCESS);
+                        MessageSpy.StatisticsGroup.TO_SWITCH_ENQUEUED_SUCCESS);
                 covered = true;
             }
         } 
         
         if (! covered) {
-            messageSpy.spyMessage(notSupportedTask, MessageSpy.STATISTIC_GROUP.TO_SWITCH_ENQUEUED_FAILED);
+            messageSpy.spyMessage(notSupportedTask, MessageSpy.StatisticsGroup.TO_SWITCH_ENQUEUED_FAILED);
         }
         
         return resultFuture;
index 6ef2a029bdaa6853b3770eb2e1c2d97d4ea1e8bd..be7295dbc4761c2342ca2bc0b37e4179146a0a0a 100644 (file)
@@ -117,7 +117,7 @@ public abstract class OFRpcTaskUtil {
                 } else {
                     notificationProviderService.publish(notificationComposer.compose(result.getResult().getTransactionId()));
                     task.getTaskContext().getMessageSpy().spyMessage(
-                            task.getInput(), MessageSpy.STATISTIC_GROUP.TO_SWITCH_SUBMITTED_SUCCESS);
+                            task.getInput(), MessageSpy.StatisticsGroup.TO_SWITCH_SUBMITTED_SUCCESS);
                 }
             }
 
@@ -125,7 +125,7 @@ public abstract class OFRpcTaskUtil {
             public void onFailure(final Throwable t) {
                 //TODO: good place to notify MD-SAL about errors
                 task.getTaskContext().getMessageSpy().spyMessage(
-                        task.getInput(), MessageSpy.STATISTIC_GROUP.TO_SWITCH_SUBMITTED_FAILURE);
+                        task.getInput(), MessageSpy.StatisticsGroup.TO_SWITCH_SUBMITTED_FAILURE);
             }
         }
 
index 1c610a612b71a16cf0df6a7a5e673aa23ec39e03..60f6114b9b3f4f6d66989a24433972e10e910532 100644 (file)
@@ -26,7 +26,7 @@ import org.opendaylight.openflowplugin.api.openflow.md.queue.QueueItem;
 import org.opendaylight.openflowplugin.api.openflow.md.queue.QueueKeeper;
 import org.opendaylight.openflowplugin.api.openflow.md.queue.QueueProcessor;
 import org.opendaylight.openflowplugin.api.openflow.statistics.MessageSpy;
-import org.opendaylight.openflowplugin.api.openflow.statistics.MessageSpy.STATISTIC_GROUP;
+import org.opendaylight.openflowplugin.api.openflow.statistics.MessageSpy.StatisticsGroup;
 import org.opendaylight.openflowplugin.openflow.md.core.ThreadPoolLoggingExecutor;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
@@ -135,7 +135,7 @@ public class QueueProcessorLightImpl implements QueueProcessor<OfHeader, DataObj
 
     @Override
     public void enqueueQueueItem(QueueItem<OfHeader> queueItem) {
-        messageSpy.spyMessage(queueItem.getMessage(), STATISTIC_GROUP.FROM_SWITCH_ENQUEUED);
+        messageSpy.spyMessage(queueItem.getMessage(), StatisticsGroup.FROM_SWITCH_ENQUEUED);
         TicketImpl<OfHeader, DataObject> ticket = new TicketImpl<>();
         ticket.setConductor(queueItem.getConnectionConductor());
         ticket.setMessage(queueItem.getMessage());
@@ -150,7 +150,7 @@ public class QueueProcessorLightImpl implements QueueProcessor<OfHeader, DataObj
 
     @Override
     public void directProcessQueueItem(QueueItem<OfHeader> queueItem) {
-        messageSpy.spyMessage(queueItem.getMessage(), STATISTIC_GROUP.FROM_SWITCH_ENQUEUED);
+        messageSpy.spyMessage(queueItem.getMessage(), StatisticsGroup.FROM_SWITCH_ENQUEUED);
         TicketImpl<OfHeader, DataObject> ticket = new TicketImpl<>();
         ticket.setConductor(queueItem.getConnectionConductor());
         ticket.setMessage(queueItem.getMessage());
index ef594bb7d32cd67c60984a0a24fd65071c402e35..1ff698dd879ba47d2fe3befab23d2857cab798e0 100644 (file)
@@ -48,20 +48,20 @@ public class MessageSpyCounterImpl implements MessageObservatory<DataContainer>
         }
     }
 
-    private final ConcurrentMap<STATISTIC_GROUP, ConcurrentMap<Class<? extends DataContainer>, MessageCounters>> inputStats = new ConcurrentHashMap<>();
+    private final ConcurrentMap<StatisticsGroup, ConcurrentMap<Class<? extends DataContainer>, MessageCounters>> inputStats = new ConcurrentHashMap<>();
 
     @Override
     public void spyIn(final DataContainer message) {
-        getCounters(message, STATISTIC_GROUP.FROM_SWITCH_TRANSLATE_IN_SUCCESS).increment();
+        getCounters(message, StatisticsGroup.FROM_SWITCH_TRANSLATE_IN_SUCCESS).increment();
     }
 
     @Override
     public void spyOut(final DataContainer message) {
-        getCounters(message, STATISTIC_GROUP.FROM_SWITCH_TRANSLATE_OUT_SUCCESS).increment();
+        getCounters(message, StatisticsGroup.FROM_SWITCH_TRANSLATE_OUT_SUCCESS).increment();
     }
 
     @Override
-    public void spyMessage(final DataContainer message, final STATISTIC_GROUP statGroup) {
+    public void spyMessage(final DataContainer message, final StatisticsGroup statGroup) {
         getCounters(message, statGroup).increment();
     }
 
@@ -70,7 +70,7 @@ public class MessageSpyCounterImpl implements MessageObservatory<DataContainer>
      * @param statGroup TODO
      * @return
      */
-    private MessageCounters getCounters(final DataContainer message, final STATISTIC_GROUP statGroup) {
+    private MessageCounters getCounters(final DataContainer message, final StatisticsGroup statGroup) {
         Class<? extends DataContainer> msgType = message.getImplementedInterface();
         ConcurrentMap<Class<? extends DataContainer>, MessageCounters> groupData = getOrCreateGroupData(statGroup);
         MessageCounters counters = getOrCreateCountersPair(msgType, groupData);
@@ -89,7 +89,7 @@ public class MessageSpyCounterImpl implements MessageObservatory<DataContainer>
 
     }
 
-    private ConcurrentMap<Class<? extends DataContainer>, MessageCounters> getOrCreateGroupData(final STATISTIC_GROUP statGroup) {
+    private ConcurrentMap<Class<? extends DataContainer>, MessageCounters> getOrCreateGroupData(final StatisticsGroup statGroup) {
         final ConcurrentMap<Class<? extends DataContainer>, MessageCounters> lookup = inputStats.get(statGroup);
         if (lookup != null) {
             return lookup;
@@ -115,7 +115,7 @@ public class MessageSpyCounterImpl implements MessageObservatory<DataContainer>
     public List<String> dumpMessageCounts() {
         List<String> dump = new ArrayList<>();
 
-        for (STATISTIC_GROUP statGroup : STATISTIC_GROUP.values()) {
+        for (StatisticsGroup statGroup : StatisticsGroup.values()) {
             Map<Class<? extends DataContainer>, MessageCounters> groupData = inputStats.get(statGroup);
             if (groupData != null) {
                 for (Entry<Class<? extends DataContainer>, MessageCounters> statEntry : groupData.entrySet()) {
index 249803836a695f35446292961c8b40ff06e9a62e..49f1a8a2e15414fadebf160657f358a06f59e03b 100644 (file)
@@ -31,7 +31,7 @@ public class MessageSpyCounterImplTest {
         assertEquals(EXPECTED_MSG_COUNT,messageCounts.size());
 
         assertEquals("FROM_SWITCH_ENQUEUED: no activity detected", messageCounts.get(0));
-        messageSpyCounter.spyMessage(msg, MessageSpy.STATISTIC_GROUP.FROM_SWITCH_ENQUEUED);
+        messageSpyCounter.spyMessage(msg, MessageSpy.StatisticsGroup.FROM_SWITCH_ENQUEUED);
         messageCounts = messageSpyCounter.dumpMessageCounts();
         assertEquals("FROM_SWITCH_ENQUEUED: MSG[Action] -> +1 | 1", messageCounts.get(0));