Pankaj Berde | 85016ab | 2013-06-21 11:34:53 -0700 | [diff] [blame] | 1 | package net.onrc.onos.graph; |
| 2 | |
Toshio Koide | 3f23354 | 2014-01-07 14:19:09 -0800 | [diff] [blame] | 3 | import java.util.Map; |
| 4 | |
Pankaj Berde | 85016ab | 2013-06-21 11:34:53 -0700 | [diff] [blame] | 5 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IDeviceObject; |
| 6 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowEntry; |
| 7 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowPath; |
| 8 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IPortObject; |
| 9 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.ISwitchObject; |
| 10 | import net.onrc.onos.ofcontroller.util.FlowEntryId; |
| 11 | import net.onrc.onos.ofcontroller.util.FlowId; |
| 12 | |
| 13 | public interface IDBOperation { |
| 14 | public ISwitchObject newSwitch(String dpid); |
| 15 | public ISwitchObject searchSwitch(String dpid); |
| 16 | public ISwitchObject searchActiveSwitch(String dpid); |
| 17 | public Iterable<ISwitchObject> getActiveSwitches(); |
| 18 | public Iterable<ISwitchObject> getAllSwitches(); |
| 19 | public Iterable<ISwitchObject> getInactiveSwitches(); |
| 20 | public Iterable<IFlowEntry> getAllSwitchNotUpdatedFlowEntries(); |
| 21 | public void removeSwitch(ISwitchObject sw); |
| 22 | |
Pankaj Berde | bbd3861 | 2013-06-22 05:59:12 -0700 | [diff] [blame] | 23 | @Deprecated |
Pankaj Berde | 85016ab | 2013-06-21 11:34:53 -0700 | [diff] [blame] | 24 | public IPortObject newPort(Short portNumber); |
Pankaj Berde | bbd3861 | 2013-06-22 05:59:12 -0700 | [diff] [blame] | 25 | public IPortObject newPort(String dpid, Short portNum); |
| 26 | public IPortObject searchPort(String dpid, Short number); |
Pankaj Berde | 85016ab | 2013-06-21 11:34:53 -0700 | [diff] [blame] | 27 | public void removePort(IPortObject port); |
| 28 | |
| 29 | public IDeviceObject newDevice(); |
| 30 | public IDeviceObject searchDevice(String macAddr); |
| 31 | public Iterable<IDeviceObject> getDevices(); |
| 32 | public void removeDevice(IDeviceObject dev); |
| 33 | |
| 34 | public IFlowPath newFlowPath(); |
| 35 | public IFlowPath searchFlowPath(FlowId flowId); |
| 36 | public IFlowPath getFlowPathByFlowEntry(IFlowEntry flowEntry); |
| 37 | public Iterable<IFlowPath> getAllFlowPaths(); |
| 38 | public void removeFlowPath(IFlowPath flowPath); |
| 39 | |
| 40 | public IFlowEntry newFlowEntry(); |
| 41 | public IFlowEntry searchFlowEntry(FlowEntryId flowEntryId); |
| 42 | public Iterable<IFlowEntry> getAllFlowEntries(); |
| 43 | public void removeFlowEntry(IFlowEntry flowEntry); |
Toshio Koide | 3f23354 | 2014-01-07 14:19:09 -0800 | [diff] [blame] | 44 | |
| 45 | public void setFlowProperties(IFlowEntry flowEntry, Map<String, Object> map); |
| 46 | |
Pankaj Berde | 85016ab | 2013-06-21 11:34:53 -0700 | [diff] [blame] | 47 | public IDBConnection getDBConnection(); |
| 48 | public void commit(); |
| 49 | public void rollback(); |
| 50 | public void close(); |
Pankaj Berde | bbd3861 | 2013-06-22 05:59:12 -0700 | [diff] [blame] | 51 | |
Pankaj Berde | 85016ab | 2013-06-21 11:34:53 -0700 | [diff] [blame] | 52 | } |