public class AttachmentPoint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) long |
activeSince |
static long |
CONSISTENT_TIMEOUT |
static long |
EXTERNAL_TO_EXTERNAL_TIMEOUT |
static long |
INACTIVITY_INTERVAL |
(package private) long |
lastSeen |
static long |
OPENFLOW_TO_EXTERNAL_TIMEOUT |
(package private) short |
port |
(package private) long |
sw |
Constructor and Description |
---|
AttachmentPoint(AttachmentPoint ap)
Constructor with an AttachmentPoint instance
|
AttachmentPoint(long sw,
short port,
long lastSeen)
Constructor
|
AttachmentPoint(long sw,
short port,
long activeSince,
long lastSeen)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares with an input object about the switch and port.
|
long |
getActiveSince()
Returns the time when this instance is activated.
|
long |
getLastSeen()
Returns the recent time when this instance is used.
|
short |
getPort()
Returns the switch port.
|
long |
getSw()
Returns the switch dpid.
|
int |
hashCode()
Hash is generated using only switch and port.
|
void |
setActiveSince(long activeSince)
Sets the time when this instance is activated.
|
void |
setLastSeen(long lastSeen)
Updates the recent time when this instance is used.
|
void |
setPort(short port)
Sets the switch port.
|
void |
setSw(long sw)
Sets the switch dpid.
|
java.lang.String |
toString() |
long sw
short port
long activeSince
long lastSeen
public static final long INACTIVITY_INTERVAL
public static final long EXTERNAL_TO_EXTERNAL_TIMEOUT
public static final long OPENFLOW_TO_EXTERNAL_TIMEOUT
public static final long CONSISTENT_TIMEOUT
public AttachmentPoint(long sw, short port, long activeSince, long lastSeen)
sw
- the switch dpidport
- the switch portactiveSince
- the timestamp when this instance is activatedlastSeen
- the recent timestamp when this instance is usedpublic AttachmentPoint(long sw, short port, long lastSeen)
sw
- the switch dpidport
- the switch portlastSeen
- the recent timestamp when this instance is usedpublic AttachmentPoint(AttachmentPoint ap)
ap
- an AttachmentPoint instancepublic long getSw()
public void setSw(long sw)
sw
- the new switch dpidpublic short getPort()
public void setPort(short port)
port
- the new switch portpublic long getActiveSince()
public void setActiveSince(long activeSince)
activeSince
- the activated timepublic long getLastSeen()
public void setLastSeen(long lastSeen)
lastSeen
- the recent used timepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- an object to comparepublic java.lang.String toString()
toString
in class java.lang.Object