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
8 package org.opendaylight.openflowplugin.applications.frsync;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import org.opendaylight.openflowplugin.applications.frsync.impl.strategy.SynchronizationDiffInput;
12 import org.opendaylight.openflowplugin.applications.frsync.util.SyncCrudCounters;
13 import org.opendaylight.yangtools.yang.common.RpcResult;
16 * Prescribes common synchronization plan execution strategy.
17 * Implementations should be stateless.
19 public interface SyncPlanPushStrategy {
22 * Invoked to execute the synchronization strategy.
24 * @param resultVehicle bootstrap future - execution will chain it's async calls to this one
25 * @param diffInput wraps all diff data required for any strategy ({add,remove,update} x {flow,group,meter})
26 * @param counters reference to internal one-shot statistics - summary off successfully pushed items
27 * shall be recorded here
28 * @return last future of the chain
30 ListenableFuture<RpcResult<Void>> executeSyncStrategy(ListenableFuture<RpcResult<Void>> resultVehicle,
31 SynchronizationDiffInput diffInput,
32 SyncCrudCounters counters);