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