Jonathan Hart | aa38097 | 2014-04-03 10:24:46 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.intent; |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 2 | |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 3 | /** |
| 4 | * @author Toshio Koide (t-koide@onlab.us) |
| 5 | */ |
| 6 | public class ConstrainedShortestPathIntent extends ShortestPathIntent { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 7 | protected double bandwidth; |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 8 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 9 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 10 | * Default constructor for Kryo deserialization. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 11 | */ |
| 12 | protected ConstrainedShortestPathIntent() { |
| 13 | } |
Toshio Koide | c406e79 | 2014-02-14 16:52:42 -0800 | [diff] [blame] | 14 | |
Ray Milkey | a5450cc | 2014-04-17 14:31:30 -0700 | [diff] [blame] | 15 | // CHECKSTYLE:OFF suppress the warning about too many parameters |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 16 | public ConstrainedShortestPathIntent(String id, |
| 17 | long srcSwitch, long srcPort, long srcMac, |
| 18 | long dstSwitch, long dstPort, long dstMac, |
| 19 | double bandwidth) { |
Ray Milkey | a5450cc | 2014-04-17 14:31:30 -0700 | [diff] [blame] | 20 | // CHECKSTYLE:ON |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 21 | super(id, srcSwitch, srcPort, srcMac, dstSwitch, dstPort, dstMac); |
| 22 | this.bandwidth = bandwidth; |
| 23 | } |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 24 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 25 | public double getBandwidth() { |
| 26 | return bandwidth; |
| 27 | } |
Pavlin Radoslavov | 7fb1641 | 2014-04-11 18:45:19 -0700 | [diff] [blame] | 28 | |
| 29 | @Override |
| 30 | public int hashCode() { |
| 31 | // TODO: Is this the intended behavior? |
| 32 | return (super.hashCode()); |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public boolean equals(Object obj) { |
| 37 | // TODO: Is this the intended behavior? |
| 38 | return (super.equals(obj)); |
| 39 | } |
Toshio Koide | ad17d5e | 2014-02-11 11:36:02 -0800 | [diff] [blame] | 40 | } |