blob: 0fd4524a965e669ea3155765316a2c9e6650a468 [file] [log] [blame]
Jonathan Hart23701d12014-04-03 10:45:48 -07001package net.onrc.onos.core.flowprogrammer;
Brian O'Connor0d6ba512013-11-05 15:17:44 -08002
Naoki Shiota2bdda572013-12-09 15:05:21 -08003import java.util.concurrent.Future;
4
Brian O'Connor0d6ba512013-11-05 15:17:44 -08005import net.floodlightcontroller.core.IOFSwitch;
Brian O'Connor0d6ba512013-11-05 15:17:44 -08006import net.floodlightcontroller.core.module.IFloodlightService;
7
8/**
Naoki Shiotab485d412013-11-26 12:04:19 -08009 * FlowSyncService is a service to synchronize GraphDB and switch's flow table.
10 * FlowSyncService offers APIs to trigger and interrupt synchronization explicitly.
Brian O'Connor0d6ba512013-11-05 15:17:44 -080011 */
12public interface IFlowSyncService extends IFloodlightService {
Naoki Shiota2bdda572013-12-09 15:05:21 -080013 public Future<SyncResult> synchronize(IOFSwitch sw);
Ray Milkey8e5170e2014-04-02 12:09:55 -070014
Brian O'Connorea1efbe2013-11-25 22:57:43 -080015 public void interrupt(IOFSwitch sw);
Ray Milkey8e5170e2014-04-02 12:09:55 -070016
Naoki Shiota2bdda572013-12-09 15:05:21 -080017 public class SyncResult {
Ray Milkey8e5170e2014-04-02 12:09:55 -070018 public final int flowAdded;
19 public final int flowRemoved;
20 public final int flowSkipped;
21
22 public SyncResult(int added, int removed, int skipped) {
23 flowAdded = added;
24 flowRemoved = removed;
25 flowSkipped = skipped;
26 }
Naoki Shiota2bdda572013-12-09 15:05:21 -080027 }
Brian O'Connor0d6ba512013-11-05 15:17:44 -080028}