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
18 public interface IFlowProgrammerService {
20 * Synchronously add a flow to the network node
23 * The target network node
26 * @return The status of this request
28 Status addFlow(Node node, Flow flow);
31 * Synchronously modify existing flow on the switch
34 * The target network node
36 * The existing flow to modify
38 * The new flow to install
39 * @return The status of this request
41 Status modifyFlow(Node node, Flow oldFlow, Flow newFlow);
44 * Synchronously remove the flow from the network node
47 * The target network node
50 * @return The status of this request
52 Status removeFlow(Node node, Flow flow);
55 * Asynchronously add a flow to the network node
58 * The target network node
61 * @return The status of this request containing the unique request id
63 Status addFlowAsync(Node node, Flow flow);
66 * Asynchronously modify existing flow on the switch
69 * The target network node
71 * The existing flow to modify
73 * The new flow to install
74 * @return The status of this request containing the unique request id
76 Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow);
79 * Asynchronously remove the flow from the network node
82 * The target network node
85 * @return The status of this request containing the unique request id
87 Status removeFlowAsync(Node node, Flow flow);
90 * Remove all flows present on the network node
93 * The target network node
94 * @return The status of this request containing the unique request id
96 Status removeAllFlows(Node node);
99 * Send Barrier message synchronously. The caller will be blocked until the
100 * solicitation response arrives.
102 * Solicit the network node to report whether all the requests sent so far
103 * are completed. When this call is done, caller knows that all past flow
104 * operations requested to the node in asynchronous fashion were satisfied
105 * by the network node and that in case of any failure, a message was sent
109 * The network node to solicit
110 * @return The status of this request containing the unique request id
112 Status syncSendBarrierMessage(Node node);
115 * Send Barrier message asynchronously. The caller is not blocked.
117 * Solicit the network node to report whether all the requests sent so far
118 * are completed. When this call is done, caller knows that all past flow
119 * operations requested to the node in asynchronous fashion were satisfied
120 * by the network node and that in case of any failure, a message was sent
124 * The network node to solicit
125 * @return The status of this request containing the unique request id
127 Status asyncSendBarrierMessage(Node node);