blob: 626b027802c6ea73f4b3099e6953c893cac7ac7b [file] [log] [blame]
tomb36046e2014-08-27 00:22:24 -07001package org.onlab.onos.net;
2
3/**
4 * Representation of a network edge location where an end-station host is
5 * connected.
6 */
tombb58c202014-09-07 22:51:50 -07007public class HostLocation extends ConnectPoint {
8
toma56d5fe2014-09-17 11:05:47 -07009 // Note that time is explicitly excluded from the notion of equality.
tombb58c202014-09-07 22:51:50 -070010 private final long time;
11
12 public HostLocation(DeviceId deviceId, PortNumber portNumber, long time) {
13 super(deviceId, portNumber);
14 this.time = time;
15 }
tomb36046e2014-08-27 00:22:24 -070016
17 /**
18 * Returns the timestamp when the location was established, given in
19 * milliseconds since start of epoch.
20 *
21 * @return timestamp in milliseconds since start of epoch
22 */
tombb58c202014-09-07 22:51:50 -070023 public long time() {
24 return time;
25 }
26
tomb36046e2014-08-27 00:22:24 -070027}