Jonathan Hart | 23701d1 | 2014-04-03 10:45:48 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.flowprogrammer; |
Brian O'Connor | 0d6ba51 | 2013-11-05 15:17:44 -0800 | [diff] [blame] | 2 | |
Naoki Shiota | 2bdda57 | 2013-12-09 15:05:21 -0800 | [diff] [blame] | 3 | import java.util.concurrent.Future; |
| 4 | |
Brian O'Connor | 0d6ba51 | 2013-11-05 15:17:44 -0800 | [diff] [blame] | 5 | import net.floodlightcontroller.core.IOFSwitch; |
Brian O'Connor | 0d6ba51 | 2013-11-05 15:17:44 -0800 | [diff] [blame] | 6 | import net.floodlightcontroller.core.module.IFloodlightService; |
| 7 | |
| 8 | /** |
Naoki Shiota | b485d41 | 2013-11-26 12:04:19 -0800 | [diff] [blame] | 9 | * FlowSyncService is a service to synchronize GraphDB and switch's flow table. |
| 10 | * FlowSyncService offers APIs to trigger and interrupt synchronization explicitly. |
Brian O'Connor | 0d6ba51 | 2013-11-05 15:17:44 -0800 | [diff] [blame] | 11 | */ |
| 12 | public interface IFlowSyncService extends IFloodlightService { |
Naoki Shiota | 2bdda57 | 2013-12-09 15:05:21 -0800 | [diff] [blame] | 13 | public Future<SyncResult> synchronize(IOFSwitch sw); |
Ray Milkey | 8e5170e | 2014-04-02 12:09:55 -0700 | [diff] [blame] | 14 | |
Brian O'Connor | ea1efbe | 2013-11-25 22:57:43 -0800 | [diff] [blame] | 15 | public void interrupt(IOFSwitch sw); |
Ray Milkey | 8e5170e | 2014-04-02 12:09:55 -0700 | [diff] [blame] | 16 | |
Naoki Shiota | 2bdda57 | 2013-12-09 15:05:21 -0800 | [diff] [blame] | 17 | public class SyncResult { |
Ray Milkey | 8e5170e | 2014-04-02 12:09:55 -0700 | [diff] [blame] | 18 | 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 Shiota | 2bdda57 | 2013-12-09 15:05:21 -0800 | [diff] [blame] | 27 | } |
Brian O'Connor | 0d6ba51 | 2013-11-05 15:17:44 -0800 | [diff] [blame] | 28 | } |