Bug 6170 + Bug 5919 - made FRS cluster-aware
[openflowplugin.git] / applications / forwardingrules-sync / src / main / java / org / opendaylight / openflowplugin / applications / frsync / SyncPlanPushStrategy.java
1 /**
2  * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.openflowplugin.applications.frsync;
10
11 import com.google.common.util.concurrent.ListenableFuture;
12 import org.opendaylight.openflowplugin.applications.frsync.impl.strategy.SynchronizationDiffInput;
13 import org.opendaylight.openflowplugin.applications.frsync.util.SyncCrudCounters;
14 import org.opendaylight.yangtools.yang.common.RpcResult;
15
16 /**
17  * Prescribes common synchronization plan execution strategy.
18  * Implementations should be stateless.
19  */
20 public interface SyncPlanPushStrategy {
21
22     /**
23      * @param resultVehicle bootstrap future - execution will chain it's async calls to this one
24      * @param diffInput     wraps all diff data required for any strategy ({add,remove,update} x {flow,group,meter})
25      * @param counters      reference to internal one-shot statistics - summary off successfully pushed items
26      *                      shall be recorded here
27      * @return last future of the chain
28      */
29     ListenableFuture<RpcResult<Void>> executeSyncStrategy(ListenableFuture<RpcResult<Void>> resultVehicle,
30                                                           SynchronizationDiffInput diffInput,
31                                                           SyncCrudCounters counters);
32 }