2 * Copyright (c) 2016 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.openflowplugin.applications.frsync;
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;
17 * Prescribes common synchronization plan execution strategy.
18 * Implementations should be stateless.
20 public interface SyncPlanPushStrategy {
23 * Invoked to execute the synchronization strategy.
25 * @param resultVehicle bootstrap future - execution will chain it's async calls to this one
26 * @param diffInput wraps all diff data required for any strategy ({add,remove,update} x {flow,group,meter})
27 * @param counters reference to internal one-shot statistics - summary off successfully pushed items
28 * shall be recorded here
29 * @return last future of the chain
31 ListenableFuture<RpcResult<Void>> executeSyncStrategy(ListenableFuture<RpcResult<Void>> resultVehicle,
32 SynchronizationDiffInput diffInput,
33 SyncCrudCounters counters);