diff options
author | CNlucius <lukai1@huawei.com> | 2016-09-13 11:40:12 +0800 |
---|---|---|
committer | CNlucius <lukai1@huawei.com> | 2016-09-13 11:41:53 +0800 |
commit | b731e2f1dd0972409b136aebc7b463dd72c9cfad (patch) | |
tree | 5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PortNextObjectiveStoreKey.java | |
parent | ee93993458266114c29271a481ef9ce7ce621b2a (diff) |
ONOSFW-171
O/S-SFC-ONOS scenario documentation
Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365
Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PortNextObjectiveStoreKey.java')
-rw-r--r-- | framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PortNextObjectiveStoreKey.java | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PortNextObjectiveStoreKey.java b/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PortNextObjectiveStoreKey.java deleted file mode 100644 index 5555565c..00000000 --- a/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/PortNextObjectiveStoreKey.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.onosproject.segmentrouting.grouphandler; - -import org.onosproject.net.DeviceId; -import org.onosproject.net.PortNumber; -import org.onosproject.net.flow.TrafficTreatment; - -import java.util.Objects; - -/** - * Class definition of Key for Device/Port to NextObjective store. Since there - * can be multiple next objectives to the same physical port, we differentiate - * between them by including the treatment in the key. - */ -public class PortNextObjectiveStoreKey { - private final DeviceId deviceId; - private final PortNumber portNum; - private final TrafficTreatment treatment; - - public PortNextObjectiveStoreKey(DeviceId deviceId, PortNumber portNum, - TrafficTreatment treatment) { - this.deviceId = deviceId; - this.portNum = portNum; - this.treatment = treatment; - } - - /** - * Gets device id in this PortNextObjectiveStoreKey. - * - * @return device id - */ - public DeviceId deviceId() { - return deviceId; - } - - /** - * Gets port information in this PortNextObjectiveStoreKey. - * - * @return port information - */ - public PortNumber portNumber() { - return portNum; - } - - /** - * Gets treatment information in this PortNextObjectiveStoreKey. - * - * @return treatment information - */ - public TrafficTreatment treatment() { - return treatment; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof PortNextObjectiveStoreKey)) { - return false; - } - PortNextObjectiveStoreKey that = - (PortNextObjectiveStoreKey) o; - return (Objects.equals(this.deviceId, that.deviceId) && - Objects.equals(this.portNum, that.portNum) && - Objects.equals(this.treatment, that.treatment)); - } - - @Override - public int hashCode() { - return Objects.hash(deviceId, portNum, treatment); - } - - @Override - public String toString() { - return "Device: " + deviceId + " Port: " + portNum + " Treatment: " + treatment; - } -} |