Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.linkdiscovery.internal; |
| 2 | |
Pankaj Berde | 6debb04 | 2013-01-16 18:04:32 -0800 | [diff] [blame] | 3 | import java.util.ArrayList; |
Jonathan Hart | b7e3d2c | 2013-01-15 18:45:19 -0800 | [diff] [blame] | 4 | import java.util.List; |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 5 | |
Jonathan Hart | b7e3d2c | 2013-01-15 18:45:19 -0800 | [diff] [blame] | 6 | import net.floodlightcontroller.linkdiscovery.LinkInfo; |
| 7 | import net.floodlightcontroller.routing.Link; |
HIGUCHI Yuta | 2051490 | 2013-06-12 11:24:16 -0700 | [diff] [blame] | 8 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IPortObject; |
| 9 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.ISwitchObject; |
HIGUCHI Yuta | 80c3ab8 | 2013-06-12 13:17:05 -0700 | [diff] [blame^] | 10 | import net.onrc.onos.ofcontroller.linkdiscovery.ILinkStorage; |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 11 | import net.onrc.onos.util.GraphDBConnection; |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 12 | import net.onrc.onos.util.GraphDBConnection.Transaction; |
Jonathan Hart | b7e3d2c | 2013-01-15 18:45:19 -0800 | [diff] [blame] | 13 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 14 | import org.openflow.util.HexString; |
| 15 | import org.slf4j.Logger; |
| 16 | import org.slf4j.LoggerFactory; |
| 17 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 18 | import com.thinkaurelius.titan.core.TitanException; |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 19 | import com.tinkerpop.blueprints.Direction; |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 20 | import com.tinkerpop.blueprints.Edge; |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 21 | import com.tinkerpop.blueprints.Vertex; |
Jonathan Hart | b7e3d2c | 2013-01-15 18:45:19 -0800 | [diff] [blame] | 22 | import com.tinkerpop.gremlin.java.GremlinPipeline; |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 23 | import com.tinkerpop.pipes.PipeFunction; |
| 24 | import com.tinkerpop.pipes.transform.PathPipe; |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 25 | |
| 26 | public class LinkStorageImpl implements ILinkStorage { |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 27 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 28 | protected static Logger log = LoggerFactory.getLogger(LinkStorageImpl.class); |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 29 | protected String conf; |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 30 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 31 | @Override |
| 32 | public void update(Link link, DM_OPERATION op) { |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 33 | update(link, (LinkInfo)null, op); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | @Override |
| 37 | public void update(List<Link> links, DM_OPERATION op) { |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 38 | for (Link lt: links) { |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 39 | update(lt, (LinkInfo)null, op); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 40 | } |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public void update(Link link, LinkInfo linkinfo, DM_OPERATION op) { |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 45 | switch (op) { |
| 46 | case UPDATE: |
| 47 | case CREATE: |
| 48 | case INSERT: |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 49 | updateLink(link, linkinfo, op); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 50 | break; |
| 51 | case DELETE: |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 52 | deleteLink(link); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 53 | break; |
| 54 | } |
| 55 | } |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 56 | |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 57 | public void updateLink(Link lt, LinkInfo linkinfo, DM_OPERATION op) { |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 58 | GraphDBConnection conn = GraphDBConnection.getInstance(this.conf); |
| 59 | IPortObject vportSrc = null, vportDst = null; |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 60 | |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 61 | log.trace("updateLink(): op {} {} {}", new Object[]{op, lt, linkinfo}); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 62 | |
| 63 | try { |
| 64 | // get source port vertex |
| 65 | String dpid = HexString.toHexString(lt.getSrc()); |
| 66 | short port = lt.getSrcPort(); |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 67 | vportSrc = conn.utils().searchPort(conn, dpid, port); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 68 | |
| 69 | // get dest port vertex |
| 70 | dpid = HexString.toHexString(lt.getDst()); |
| 71 | port = lt.getDstPort(); |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 72 | vportDst = conn.utils().searchPort(conn, dpid, port); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 73 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 74 | if (vportSrc != null && vportDst != null) { |
Pankaj Berde | 86a0d41 | 2013-04-05 15:06:26 -0700 | [diff] [blame] | 75 | |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 76 | // check if the link exists |
Pankaj Berde | 77b5851 | 2013-04-05 12:06:37 -0700 | [diff] [blame] | 77 | |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 78 | Iterable<IPortObject> currPorts = vportSrc.getLinkedPorts(); |
| 79 | List<IPortObject> currLinks = new ArrayList<IPortObject>(); |
Pankaj Berde | 77b5851 | 2013-04-05 12:06:37 -0700 | [diff] [blame] | 80 | for (IPortObject V : currPorts) { |
Pankaj Berde | 6debb04 | 2013-01-16 18:04:32 -0800 | [diff] [blame] | 81 | currLinks.add(V); |
| 82 | } |
| 83 | |
| 84 | if (currLinks.contains(vportDst)) { |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 85 | // TODO: update linkinfo |
| 86 | if (op.equals(DM_OPERATION.INSERT) || op.equals(DM_OPERATION.CREATE)) { |
Umesh Krishnaswamy | 9306f95 | 2013-01-24 20:42:59 -0800 | [diff] [blame] | 87 | log.debug("addOrUpdateLink(): failed link exists {} {} src {} dst {}", |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 88 | new Object[]{op, lt, vportSrc, vportDst}); |
| 89 | } |
Pankaj Berde | 0fc4e43 | 2013-01-12 09:47:22 -0800 | [diff] [blame] | 90 | } else { |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 91 | vportSrc.setLinkPort(vportDst); |
| 92 | |
Pankaj Berde | 86a0d41 | 2013-04-05 15:06:26 -0700 | [diff] [blame] | 93 | conn.endTx(Transaction.COMMIT); |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 94 | log.debug("updateLink(): link added {} {} src {} dst {}", new Object[]{op, lt, vportSrc, vportDst}); |
Pankaj Berde | 0fc4e43 | 2013-01-12 09:47:22 -0800 | [diff] [blame] | 95 | } |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 96 | } else { |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 97 | log.error("updateLink(): failed invalid vertices {} {} src {} dst {}", new Object[]{op, lt, vportSrc, vportDst}); |
| 98 | conn.endTx(Transaction.ROLLBACK); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 99 | } |
| 100 | } catch (TitanException e) { |
| 101 | /* |
| 102 | * retry till we succeed? |
| 103 | */ |
Umesh Krishnaswamy | c56a8cc | 2013-01-24 21:47:51 -0800 | [diff] [blame] | 104 | e.printStackTrace(); |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 105 | log.error("updateLink(): titan exception {} {} {}", new Object[]{op, lt, e.toString()}); |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 106 | } |
| 107 | } |
| 108 | |
| 109 | @Override |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 110 | public void deleteLinks(List<Link> links) { |
| 111 | |
| 112 | for (Link lt : links) { |
| 113 | deleteLink(lt); |
| 114 | } |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 115 | } |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 116 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 117 | |
| 118 | @Override |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 119 | public void deleteLink(Link lt) { |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 120 | GraphDBConnection conn = GraphDBConnection.getInstance(this.conf); |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 121 | IPortObject vportSrc = null, vportDst = null; |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 122 | int count = 0; |
| 123 | |
| 124 | log.debug("deleteLink(): {}", lt); |
| 125 | |
| 126 | try { |
| 127 | // get source port vertex |
| 128 | String dpid = HexString.toHexString(lt.getSrc()); |
| 129 | short port = lt.getSrcPort(); |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 130 | vportSrc = conn.utils().searchPort(conn, dpid, port); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 131 | |
| 132 | // get dst port vertex |
| 133 | dpid = HexString.toHexString(lt.getDst()); |
| 134 | port = lt.getDstPort(); |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 135 | vportDst = conn.utils().searchPort(conn, dpid, port); |
| 136 | // FIXME: This needs to remove all edges |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 137 | |
| 138 | if (vportSrc != null && vportDst != null) { |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 139 | |
| 140 | /* for (Edge e : vportSrc.asVertex().getEdges(Direction.OUT)) { |
Umesh Krishnaswamy | 11060ed | 2013-01-23 19:24:36 -0800 | [diff] [blame] | 141 | log.debug("deleteLink(): {} in {} out {}", |
| 142 | new Object[]{e.getLabel(), e.getVertex(Direction.IN), e.getVertex(Direction.OUT)}); |
| 143 | if (e.getLabel().equals("link") && e.getVertex(Direction.IN).equals(vportDst)) { |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 144 | graph.removeEdge(e); |
| 145 | count++; |
| 146 | } |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 147 | }*/ |
| 148 | vportSrc.removeLink(vportDst); |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 149 | conn.endTx(Transaction.COMMIT); |
Pankaj Berde | 2239f0d | 2013-04-04 09:42:43 -0700 | [diff] [blame] | 150 | log.debug("deleteLink(): deleted edges src {} dst {}", new Object[]{ |
| 151 | lt, vportSrc, vportDst}); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 152 | |
| 153 | } else { |
Umesh Krishnaswamy | 9306f95 | 2013-01-24 20:42:59 -0800 | [diff] [blame] | 154 | log.error("deleteLink(): failed invalid vertices {} src {} dst {}", new Object[]{lt, vportSrc, vportDst}); |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 155 | conn.endTx(Transaction.ROLLBACK); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | } catch (TitanException e) { |
| 159 | /* |
| 160 | * retry till we succeed? |
| 161 | */ |
Umesh Krishnaswamy | c56a8cc | 2013-01-24 21:47:51 -0800 | [diff] [blame] | 162 | log.error("deleteLink(): titan exception {} {}", new Object[]{lt, e.toString()}); |
Pankaj Berde | 254abb4 | 2013-06-10 21:21:49 -0700 | [diff] [blame] | 163 | conn.endTx(Transaction.ROLLBACK); |
Umesh Krishnaswamy | c56a8cc | 2013-01-24 21:47:51 -0800 | [diff] [blame] | 164 | e.printStackTrace(); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 165 | } |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 166 | } |
| 167 | |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 168 | // TODO: Fix me |
| 169 | @Override |
| 170 | public List<Link> getLinks(Long dpid, short port) { |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 171 | GraphDBConnection conn = GraphDBConnection.getInstance(this.conf); |
| 172 | IPortObject vportSrc, vportDst; |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 173 | List<Link> links = null; |
| 174 | Link lt; |
| 175 | |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 176 | vportSrc = conn.utils().searchPort(conn, HexString.toHexString(dpid), port); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 177 | if (vportSrc != null) { |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 178 | |
| 179 | for (Edge e : vportSrc.asVertex().getEdges(Direction.OUT)) { |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 180 | if (e.getLabel().equals("link")) { |
| 181 | break; |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | return null; |
| 186 | } |
| 187 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 188 | @Override |
| 189 | public void init(String conf) { |
Pankaj Berde | 1f10be0 | 2013-02-01 14:06:02 -0800 | [diff] [blame] | 190 | //TODO extract the DB location from properties |
Pankaj Berde | 67f88fb | 2013-01-15 17:16:01 -0800 | [diff] [blame] | 191 | |
Pankaj Berde | 5fb2763 | 2013-04-05 08:56:12 -0700 | [diff] [blame] | 192 | this.conf = conf; |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 193 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 194 | } |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 195 | |
| 196 | @Override |
| 197 | public void deleteLinksOnPort(Long dpid, short port) { |
| 198 | // TODO Auto-generated method stub |
| 199 | |
| 200 | } |
| 201 | |
Pankaj Berde | ff42180 | 2013-01-29 20:28:52 -0800 | [diff] [blame] | 202 | @Override |
| 203 | public List<Link> getLinks(String dpid) { |
| 204 | // TODO Auto-generated method stub |
| 205 | return null; |
| 206 | } |
| 207 | |
| 208 | public List<Link> getActiveLinks() { |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 209 | |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 210 | GraphDBConnection conn = GraphDBConnection.getInstance(this.conf); |
Pankaj Berde | ff42180 | 2013-01-29 20:28:52 -0800 | [diff] [blame] | 211 | |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 212 | Iterable<ISwitchObject> switches = conn.utils().getActiveSwitches(conn); |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 213 | |
| 214 | List<Link> links = new ArrayList<Link>(); |
| 215 | for (ISwitchObject sw : switches) { |
| 216 | GremlinPipeline<Vertex, Link> pipe = new GremlinPipeline<Vertex, Link>(); |
| 217 | ExtractLink extractor = new ExtractLink(); |
| 218 | |
| 219 | pipe.start(sw.asVertex()); |
| 220 | pipe.enablePath(true); |
Pankaj Berde | 1f10be0 | 2013-02-01 14:06:02 -0800 | [diff] [blame] | 221 | pipe.out("on").out("link").in("on").path().step(extractor); |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 222 | |
Pankaj Berde | 1f10be0 | 2013-02-01 14:06:02 -0800 | [diff] [blame] | 223 | while (pipe.hasNext() ) { |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 224 | Link l = pipe.next(); |
| 225 | links.add(l); |
| 226 | } |
| 227 | |
| 228 | } |
| 229 | return links; |
Pankaj Berde | ff42180 | 2013-01-29 20:28:52 -0800 | [diff] [blame] | 230 | } |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 231 | |
| 232 | static class ExtractLink implements PipeFunction<PathPipe<Vertex>, Link> { |
| 233 | |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 234 | @Override |
| 235 | public Link compute(PathPipe<Vertex> pipe ) { |
Pankaj Berde | d18c762 | 2013-02-04 10:28:35 -0800 | [diff] [blame] | 236 | // TODO Auto-generated method stub |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 237 | long s_dpid = 0; |
| 238 | long d_dpid = 0; |
| 239 | short s_port = 0; |
| 240 | short d_port = 0; |
| 241 | List<Vertex> V = new ArrayList<Vertex>(); |
| 242 | V = pipe.next(); |
| 243 | Vertex src_sw = V.get(0); |
| 244 | Vertex dest_sw = V.get(3); |
| 245 | Vertex src_port = V.get(1); |
| 246 | Vertex dest_port = V.get(2); |
| 247 | s_dpid = HexString.toLong((String) src_sw.getProperty("dpid")); |
| 248 | d_dpid = HexString.toLong((String) dest_sw.getProperty("dpid")); |
| 249 | s_port = (Short) src_port.getProperty("number"); |
| 250 | d_port = (Short) dest_port.getProperty("number"); |
| 251 | |
| 252 | Link l = new Link(s_dpid,s_port,d_dpid,d_port); |
| 253 | |
| 254 | return l; |
| 255 | } |
| 256 | } |
Pankaj Berde | d18c762 | 2013-02-04 10:28:35 -0800 | [diff] [blame] | 257 | |
| 258 | public void finalize() { |
| 259 | close(); |
| 260 | } |
| 261 | |
| 262 | @Override |
| 263 | public void close() { |
| 264 | // TODO Auto-generated method stub |
Pankaj Berde | 6201614 | 2013-04-09 15:35:50 -0700 | [diff] [blame] | 265 | // graph.shutdown(); |
Pankaj Berde | d18c762 | 2013-02-04 10:28:35 -0800 | [diff] [blame] | 266 | } |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 267 | |
Pankaj Berde | ff42180 | 2013-01-29 20:28:52 -0800 | [diff] [blame] | 268 | |
Umesh Krishnaswamy | b676ca2 | 2013-01-11 12:39:25 -0800 | [diff] [blame] | 269 | } |