Revert "Checkstyle enforcer"
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / flowprogrammer / IFlowProgrammerService.java
index 69972d67768fdcec042ac27f646f670c513561bd..d2af1a8c7c5a4a026d8fd43e9168f8d65e83a81c 100644 (file)
@@ -17,33 +17,112 @@ import org.opendaylight.controller.sal.utils.Status;
  */
 public interface IFlowProgrammerService {
     /**
-     * Add a flow to the network node
+     * Synchronously add a flow to the network node
      * 
      * @param node
+     *            The target network node
      * @param flow
+     *            The flow to install
+     * @return The status of this request
      */
     Status addFlow(Node node, Flow flow);
 
     /**
-     * Modify existing flow on the switch
+     * Synchronously modify existing flow on the switch
      * 
      * @param node
-     * @param flow
+     *            The target network node
+     * @param oldFlow
+     *            The existing flow to modify
+     * @param newFlow
+     *            The new flow to install
+     * @return The status of this request
      */
-    Status modifyFlow(Node node, Flow oldflow, Flow newFlow);
+    Status modifyFlow(Node node, Flow oldFlow, Flow newFlow);
 
     /**
-     * Remove the flow from the network node
+     * Synchronously remove the flow from the network node
      * 
      * @param node
+     *            The target network node
      * @param flow
+     *            The flow to remove
+     * @return The status of this request
      */
     Status removeFlow(Node node, Flow flow);
 
+    /**
+     * Asynchronously add a flow to the network node
+     * 
+     * @param node
+     *            The target network node
+     * @param flow
+     *            The flow to install
+     * @return The status of this request containing the unique request id
+     */
+    Status addFlowAsync(Node node, Flow flow);
+
+    /**
+     * Asynchronously modify existing flow on the switch
+     * 
+     * @param node
+     *            The target network node
+     * @param oldFlow
+     *            The existing flow to modify
+     * @param newFlow
+     *            The new flow to install
+     * @return The status of this request containing the unique request id
+     */
+    Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow);
+
+    /**
+     * Asynchronously remove the flow from the network node
+     * 
+     * @param node
+     *            The target network node
+     * @param flow
+     *            The flow to remove
+     * @return The status of this request containing the unique request id
+     */
+    Status removeFlowAsync(Node node, Flow flow);
+
     /**
      * Remove all flows present on the network node
      * 
      * @param node
+     *            The target network node
+     * @return The status of this request containing the unique request id
      */
     Status removeAllFlows(Node node);
+
+    /**
+     * Send Barrier message synchronously. The caller will be blocked until the
+     * solicitation response arrives.
+     * 
+     * Solicit the network node to report whether all the requests sent so far
+     * are completed. When this call is done, caller knows that all past flow
+     * operations requested to the node in asynchronous fashion were satisfied
+     * by the network node and that in case of any failure, a message was sent
+     * to the controller.
+     * 
+     * @param node
+     *            The network node to solicit
+     * @return The status of this request containing the unique request id
+     */
+    Status syncSendBarrierMessage(Node node);
+
+    /**
+     * Send Barrier message asynchronously. The caller is not blocked.
+     * 
+     * Solicit the network node to report whether all the requests sent so far
+     * are completed. When this call is done, caller knows that all past flow
+     * operations requested to the node in asynchronous fashion were satisfied
+     * by the network node and that in case of any failure, a message was sent
+     * to the controller.
+     * 
+     * @param node
+     *            The network node to solicit
+     * @return The status of this request containing the unique request id
+     */
+    Status asyncSendBarrierMessage(Node node);
 }