public class Entity extends Object implements Serializable
| Constructor and Description |
|---|
Entity(MacAddress mac,
VId vid,
IpAddress ip,
DataPathId dpid,
BigPortNumber port,
boolean shared,
int contollerId)
Constructs a new entity using MAC, VID, IP,
data path id, port and shared.
|
Entity(MacAddress mac,
VId vid,
IpAddress ip,
DataPathId dpid,
BigPortNumber port,
int contollerId)
Constructs a new entity using MAC, VID, IP,
data path id and port.
|
Entity(MacAddress mac,
VId vid,
IpAddress ip,
DataPathId dpid,
BigPortNumber port,
long age,
boolean shared,
int contollerId) |
Entity(MacAddress mac,
VId vid,
IpAddress ip,
DataPathId dpid,
BigPortNumber port,
long age,
int contollerId)
Constructs a new entity using MAC, VID, IP,
data path id and port.
|
| Modifier and Type | Method and Description |
|---|---|
int |
controllerId()
Returns the Controller id.
|
DataPathId |
dpid()
Returns the datapath ID of the switch to which the host is connected.
|
boolean |
equals(Object obj) |
long |
getAge()
Returns the staitc state for the entity.
|
ARPEntry |
getARPTableEntry()
Returns the arp entry from entity object.
|
NetworkNode |
getNetworkNode()
Returns the network node from entity object.
|
int |
hashCode() |
IpAddress |
ip()
Returns the IP address of the host.
|
long |
lastAccessed()
Returns the last accessed time of the entity object.
|
MacAddress |
mac()
Returns the MAC address of the host.
|
void |
resetLastAccessed()
Sets the last time the entity object was accessed as 0.
|
void |
setAge(long age)
Set the staitc state for the entity.
|
void |
setControllerId(int id)
Sets the controller id.
|
void |
setLastAccessed()
Sets the last time the entity object was accessed.
|
BigPortNumber |
switchPort()
Returns the port to which the host is connected.
|
String |
toString() |
VId |
vid()
Returns the VID on which the host is connected.
|
public Entity(MacAddress mac, VId vid, IpAddress ip, DataPathId dpid, BigPortNumber port, int contollerId)
mac - the MAC addressvid - the VIDip - the IP addressdpid - the Switch DPIDport - the portcontollerId - the hash of the controller instance idpublic Entity(MacAddress mac, VId vid, IpAddress ip, DataPathId dpid, BigPortNumber port, boolean shared, int contollerId)
Constructor has been added to help create an entity object with timestamp 0.
A shared flag is added to indicate that the entity has been received from another controller in the cluster. A shared flag value of true will cause the lastAccessed time to be set to 0 indicating that the entity has been learned from another controller in the cluster.
mac - the MAC addressvid - the VIDip - the IP addressdpid - the Switch DPIDport - the portshared - flag indicating shared entitycontollerId - the hash of the controller instance idpublic Entity(MacAddress mac, VId vid, IpAddress ip, DataPathId dpid, BigPortNumber port, long age, boolean shared, int contollerId)
public Entity(MacAddress mac, VId vid, IpAddress ip, DataPathId dpid, BigPortNumber port, long age, int contollerId)
mac - the MAC addressvid - the VIDip - the IP addressdpid - the Switch DPIDport - the portage - age flagcontollerId - the hash of the controller instance idpublic MacAddress mac()
public IpAddress ip()
public VId vid()
public DataPathId dpid()
public BigPortNumber switchPort()
public long lastAccessed()
public void setLastAccessed()
public int controllerId()
public void setControllerId(int id)
id - the new controller idpublic void resetLastAccessed()
public NetworkNode getNetworkNode()
public ARPEntry getARPTableEntry()
public long getAge()
public void setAge(long age)
Copyright © 2014. All Rights Reserved.