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