Jonathan Hart | 472062d | 2014-04-03 10:56:48 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 2 | |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 3 | // TODO Everything returned by these interfaces must be either Unmodifiable view, |
| 4 | // immutable object, or a copy of the original "SB" In-memory Topology. |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 5 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 6 | * Interface of Link object in Network Graph topology. |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 7 | */ |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 8 | public interface Link { |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 9 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 10 | * Gets the source switch for the link. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 11 | * |
| 12 | * @return the source switch for the link. |
| 13 | */ |
| 14 | public Switch getSrcSwitch(); |
Toshio Koide | 0c9106d | 2014-02-19 15:26:38 -0800 | [diff] [blame] | 15 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 16 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 17 | * Gets the source port for the link. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 18 | * |
| 19 | * @return the source port for the link. |
| 20 | */ |
| 21 | public Port getSrcPort(); |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 22 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 23 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 24 | * Gets the destination switch for the link. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 25 | * |
| 26 | * @return the destination switch for the link. |
| 27 | */ |
| 28 | public Switch getDstSwitch(); |
Yuta HIGUCHI | 181d34d | 2014-02-05 15:05:46 -0800 | [diff] [blame] | 29 | |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 30 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 31 | * Gets the destination port for the link. |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 32 | * |
| 33 | * @return the destination port for the link. |
| 34 | */ |
| 35 | public Port getDstPort(); |
| 36 | |
| 37 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 38 | * Gets the last seen time for the link. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 39 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 40 | * TODO: Not implemented yet. |
| 41 | * TODO: what is the time definition? |
| 42 | * |
| 43 | * @return the last seen time for the link. |
| 44 | */ |
| 45 | public long getLastSeenTime(); |
| 46 | |
| 47 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 48 | * Gets the link cost. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 49 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 50 | * TODO: What is the unit? |
| 51 | * |
| 52 | * @param return the link cost. |
| 53 | */ |
| 54 | public int getCost(); |
| 55 | |
| 56 | /** |
Yuta HIGUCHI | ce4a06b | 2014-04-25 19:37:57 -0700 | [diff] [blame] | 57 | * Gets the link capacity. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 58 | * <p/> |
Pavlin Radoslavov | 7c8f69a | 2014-02-19 19:01:45 -0800 | [diff] [blame] | 59 | * TODO: What is the unit? |
| 60 | * |
| 61 | * @return the link capacity. |
| 62 | */ |
| 63 | public Double getCapacity(); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 64 | } |