2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.sal.flowprogrammer;
11 import org.opendaylight.controller.sal.core.Node;
12 import org.opendaylight.controller.sal.utils.Status;
15 * Interface that defines the methods available to the functional modules above
16 * SAL for installing/modifying/removing flows on a network node
19 public interface IFlowProgrammerService {
21 * Synchronously add a flow to the network node
24 * The target network node
27 * @return The status of this request
29 Status addFlow(Node node, Flow flow);
32 * Synchronously modify existing flow on the switch
35 * The target network node
37 * The existing flow to modify
39 * The new flow to install
40 * @return The status of this request
42 Status modifyFlow(Node node, Flow oldFlow, Flow newFlow);
45 * Synchronously remove the flow from the network node
48 * The target network node
51 * @return The status of this request
53 Status removeFlow(Node node, Flow flow);
56 * Asynchronously add a flow to the network node
59 * The target network node
62 * @return The status of this request containing the unique request id
64 Status addFlowAsync(Node node, Flow flow);
67 * Asynchronously modify existing flow on the switch
70 * The target network node
72 * The existing flow to modify
74 * The new flow to install
75 * @return The status of this request containing the unique request id
77 Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow);
80 * Asynchronously remove the flow from the network node
83 * The target network node
86 * @return The status of this request containing the unique request id
88 Status removeFlowAsync(Node node, Flow flow);
91 * Remove all flows present on the network node
94 * The target network node
95 * @return The status of this request containing the unique request id
97 Status removeAllFlows(Node node);
100 * Send Barrier message synchronously. The caller will be blocked until the
101 * solicitation response arrives.
103 * Solicit the network node to report whether all the requests sent so far
104 * are completed. When this call is done, caller knows that all past flow
105 * operations requested to the node in asynchronous fashion were satisfied
106 * by the network node and that in case of any failure, a message was sent
110 * The network node to solicit
111 * @return The status of this request containing the unique request id
113 Status syncSendBarrierMessage(Node node);
116 * Send Barrier message asynchronously. The caller is not blocked.
118 * Solicit the network node to report whether all the requests sent so far
119 * are completed. When this call is done, caller knows that all past flow
120 * operations requested to the node in asynchronous fashion were satisfied
121 * by the network node and that in case of any failure, a message was sent
125 * The network node to solicit
126 * @return The status of this request containing the unique request id
128 Status asyncSendBarrierMessage(Node node);