Update comments around flat-batch service 34/45534/1
authorAndrej Leitner <andrej.leitner@pantheon.tech>
Tue, 13 Sep 2016 12:16:26 +0000 (14:16 +0200)
committerAndrej Leitner <andrej.leitner@pantheon.tech>
Tue, 13 Sep 2016 12:16:26 +0000 (14:16 +0200)
Change-Id: I62f3ccbf38fd6f5aeb830e55c5f60923c6f8e8da
Signed-off-by: Andrej Leitner <andrej.leitner@pantheon.tech>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlatBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowsBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalGroupsBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalMetersBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/batch/BatchPlanStep.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/batch/BatchStepJob.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/batch/BatchStepType.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchFlowAdapters.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchGroupAdapters.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchMeterAdapters.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/FlatBatchUtil.java

index 0967ffa0d18cc628a9c8a36d91ba650eed1e0a0a..9945854e30d8ed31352361054a07ab3eeedf16a9 100644 (file)
@@ -116,10 +116,8 @@ public class SalFlatBatchServiceImpl implements SalFlatBatchService {
                     LOG.debug("error on flat batch chain occurred -> skipping step {}", planStep.getStepType());
                     return FlatBatchUtil.createEmptyRpcBatchResultFuture(false);
                 }
-
-                LOG.trace("batch progressing on step type {}", planStep.getStepType());
-                LOG.trace("batch progressing previous steps result: {}", chainInput.isSuccessful());
-
+                LOG.trace("batch progressing on step type {}, previous steps result: {}", planStep.getStepType(),
+                        chainInput.isSuccessful());
                 return getChainOutput(node, planStep, currentOffset);
             }));
             stepOffset += planStep.getTaskBag().size();
index 635d86ee8cf15eab14c9bca171ac7251dcd6373a..00f9fbc771cf560ccc75f6cd9e7596cbf92a1b71 100644 (file)
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * default implementation of {@link SalFlowsBatchService} - delegates work to {@link SalFlowService}
+ * Default implementation of {@link SalFlowsBatchService} - delegates work to {@link SalFlowService}.
  */
 public class SalFlowsBatchServiceImpl implements SalFlowsBatchService {
     private static final Logger LOG = LoggerFactory.getLogger(SalFlowsBatchServiceImpl.class);
index 204b70c130ff8257128dfcbfb16bfd9d574081f7..92840a2a2c897012740e680acbb3a810a29b7a69 100644 (file)
@@ -55,7 +55,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * default implementation of {@link SalGroupsBatchService} - delegates work to {@link SalGroupService}
+ * Default implementation of {@link SalGroupsBatchService} - delegates work to {@link SalGroupService}.
  */
 public class SalGroupsBatchServiceImpl implements SalGroupsBatchService {
 
index 73fde2ec1450fe67086c0d5707cc7c708064aba3..6f61bc59682e3c17919beaa7b0fe410847a24cd1 100644 (file)
@@ -55,7 +55,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * default implementation of {@link SalMetersBatchService} - delegates work to {@link SalMeterService}
+ * Default implementation of {@link SalMetersBatchService} - delegates work to {@link SalMeterService}.
  */
 public class SalMetersBatchServiceImpl implements SalMetersBatchService {
 
index f64491e4d33168367f5ff408ea26ea4519016b6e..165fbaab0feef6f385a4d30bb4a4467548d7a35c 100644 (file)
@@ -13,7 +13,7 @@ import java.util.List;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.service.batch.common.rev160322.BatchOrderGrouping;
 
 /**
- * Container of CRUD actions for one type of object (flow, group, meter, ..) of same type (add, remove, update)
+ * Container of CRUD actions for one type of object (flow, group, meter, ..) of same type (add, remove, update).
  */
 public class BatchPlanStep {
     private final List<? extends BatchOrderGrouping> taskBag;
index a64175a5e5f748dbb28b583b6c93c2d5635653b0..7a629eb75408e1f2dc553e59c7fcc45500725f03 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev16032
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
 /**
- * Wrapper for batch step jobs (type + function).
+ * Wrapper for batch step jobs ({@link BatchPlanStep} and corresponding transform function).
  */
 public class BatchStepJob {
 
@@ -34,5 +34,4 @@ public class BatchStepJob {
         return stepFunction;
     }
 
-
 }
index da7edc790989d28abb56c798ab0bdbdd54ce0358..4028d432a3e3a896f77bfed9ae51aea93bd56be3 100644 (file)
@@ -9,19 +9,19 @@
 package org.opendaylight.openflowplugin.impl.services.batch;
 
 /**
- * batch step types - holding combinations of target object type and action type (e.g.: flow + update)
+ * Batch step types - holding combinations of target object type and action type.
  */
 public enum BatchStepType {
 
-    /** flow -&gt; add operation */FLOW_ADD,
-    /** flow -&gt; remove operation */FLOW_REMOVE,
-    /** flow -&gt; update operation */FLOW_UPDATE,
+    /** flow add operation */FLOW_ADD,
+    /** flow remove operation */FLOW_REMOVE,
+    /** flow update operation */FLOW_UPDATE,
 
-    /** group -&gt; add operation */GROUP_ADD,
-    /** group -&gt; remove operation */GROUP_REMOVE,
-    /** group -&gt; update operation */GROUP_UPDATE,
+    /** group add operation */GROUP_ADD,
+    /** group remove operation */GROUP_REMOVE,
+    /** group update operation */GROUP_UPDATE,
 
-    /** meter -&gt; add operation */METER_ADD,
-    /** meter -&gt; remove operation */METER_REMOVE,
-    /** meter -&gt; update operation */METER_UPDATE
+    /** meter add operation */METER_ADD,
+    /** meter remove operation */METER_REMOVE,
+    /** meter update operation */METER_UPDATE
 }
index 7949cc0094d1c5142bb1287213a8c9df54b520b6..48309a2f9f9d995725fcbbeb32c25a8682aa4616 100644 (file)
@@ -45,7 +45,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 /**
- * transform between FlatBatch API and flow batch API
+ * Transform between FlatBatch API and flow batch API.
  */
 public class FlatBatchFlowAdapters {
 
index 05731129fc97380643d6d39bf30e353a57b322bf..3ba5d322f36000e59a61e1f26a399bbcbb0ee057 100644 (file)
@@ -44,7 +44,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 /**
- * transform between FlatBatch API and group batch API
+ * Transform between FlatBatch API and group batch API.
  */
 public class FlatBatchGroupAdapters {
 
index 2dc3ef40f4e4c400509a030562d54804cb58c2fc..48ee4fbd6fe8a9387ad6230f2122ba54c2056e32 100644 (file)
@@ -44,7 +44,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 /**
- * transform between FlatBatch API and meter batch API
+ * Transform between FlatBatch API and meter batch API.
  */
 public class FlatBatchMeterAdapters {
 
index e602eb2d42a411aa3f45402fa7d5d57b6852a0bb..f4e31bae8259f915ec58257cbefee5944cbcee10 100644 (file)
@@ -38,7 +38,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
 /**
- * provides flat batch util methods
+ * Provides flat batch util methods.
  */
 public final class FlatBatchUtil {
 
@@ -175,9 +175,6 @@ public final class FlatBatchUtil {
         return type;
     }
 
-    /**
-     * @return RPC result incorporating partial results (state, errors, batch failures)
-     */
     @VisibleForTesting
     static Function<List<RpcResult<ProcessFlatBatchOutput>>, RpcResult<ProcessFlatBatchOutput>> mergeRpcResults() {
         return jobsResults -> {
@@ -202,7 +199,6 @@ public final class FlatBatchUtil {
 
     /**
      * Merge list of Futures with partial results into one ListenableFuture with single result.
-     * shortcut for {@link #mergeRpcResults()}
      * @param firedJobs list of ListenableFutures with RPC results {@link ProcessFlatBatchOutput}
      * @return ListenableFuture of RPC result with combined status and all errors + batch failures
      */
@@ -212,7 +208,7 @@ public final class FlatBatchUtil {
     }
 
     /**
-     *
+     * Creates empty result future for flat batch service.
      * @param status RPC result status
      * @return ListenableFuture of RPC result with empty list of errors and batch failures
      */