blob: 59af6d08b5985aec72473519e24cc9aadbe64963 [file] [log] [blame]
Jonathan Hart062a2e82014-02-03 09:41:57 -08001package net.onrc.onos.ofcontroller.networkgraph;
2
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08003/**
4 * Link Object stored in In-memory Topology.
5 *
6 * TODO REMOVE following design memo: This object itself may hold the DBObject,
7 * but this Object itself will not issue any read/write to the DataStore.
8 */
Jonathan Hart062a2e82014-02-03 09:41:57 -08009public class LinkImpl extends NetworkGraphObject implements Link {
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080010
Jonathan Hart062a2e82014-02-03 09:41:57 -080011 private long srcSwitch;
12 private short srcPort;
13 private long dstSwitch;
14 private short dstPort;
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080015
Jonathan Hart062a2e82014-02-03 09:41:57 -080016 private static final int DEFAULT_COST = 1;
17 private int cost = DEFAULT_COST;
18
19 public LinkImpl(NetworkGraph graph) {
20 super(graph);
21 }
22
23 @Override
24 public Port getSourcePort() {
25 // TODO Auto-generated method stub
26 return null;
27 }
28
29 @Override
30 public Port getDestinationPort() {
31 // TODO Auto-generated method stub
32 return null;
33 }
34
35 @Override
36 public Switch getSourceSwitch() {
37 // TODO Auto-generated method stub
38 return null;
39 }
40
41 @Override
42 public Switch getDestinationSwitch() {
43 // TODO Auto-generated method stub
44 return null;
45 }
46
47 @Override
48 public long getLastSeenTime() {
49 // TODO Auto-generated method stub
50 return 0;
51 }
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080052
Jonathan Hart062a2e82014-02-03 09:41:57 -080053 @Override
54 public int getCost() {
55 return cost;
56 }
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080057
Jonathan Hart062a2e82014-02-03 09:41:57 -080058 public void setCost(int cost) {
59 this.cost = cost;
60 }
61
62 @Override
63 public long getSourceSwitchDpid() {
64 return srcSwitch;
65 }
66
67 public void setSrcSwitch(long srcSwitch) {
68 this.srcSwitch = srcSwitch;
69 }
70
71 @Override
72 public short getSourcePortNumber() {
73 return srcPort;
74 }
75
76 public void setSrcPort(short srcPort) {
77 this.srcPort = srcPort;
78 }
79
80 @Override
81 public long getDestinationSwitchDpid() {
82 return dstSwitch;
83 }
84
85 public void setDstSwitch(long dstSwitch) {
86 this.dstSwitch = dstSwitch;
87 }
88
89 @Override
90 public short getDestinationPortNumber() {
91 return dstPort;
92 }
93
94 public void setDstPort(short dstPort) {
95 this.dstPort = dstPort;
96 }
97
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080098
Jonathan Hart062a2e82014-02-03 09:41:57 -080099}