blob: b73224e353b63500c0614c1a762833cc7f1d4f33 [file] [log] [blame]
Pankaj Berde5024ec12013-01-31 17:07:29 -08001package net.floodlightcontroller.linkdiscovery.internal;
2
3import java.util.List;
4
5import net.floodlightcontroller.core.INetMapTopologyService.ITopoLinkService;
6import net.floodlightcontroller.routing.Link;
7
8public class TopoLinkServiceImpl implements ITopoLinkService {
9
10 ThreadLocal<LinkStorageImpl> store = new ThreadLocal<LinkStorageImpl>() {
11 @Override
12 protected LinkStorageImpl initialValue() {
13 LinkStorageImpl inStore = new LinkStorageImpl();
14 //TODO: Get the file path from global properties
15 inStore.init("/tmp/cassandra.titan");
16 return inStore;
17 }
18 };
19
20 LinkStorageImpl linkStore = store.get();
21 @Override
22 public List<Link> GetActiveLinks() {
23 // TODO Auto-generated method stub
24 return linkStore.getActiveLinks();
25 }
26
27 @Override
28 public List<Link> GetLinksOnSwitch(String dpid) {
29 // TODO Auto-generated method stub
30 return linkStore.getLinks(dpid);
31 }
32
33}