IOFSwitch.SwitchType
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> |
attributes |
private Connection |
conn |
private java.util.Date |
connectedSince |
private long |
datapathId |
private static java.lang.String |
HA_CHECK_SWITCH |
private java.util.concurrent.ConcurrentMap<java.lang.Short,java.lang.Long> |
portBroadcastCacheHitMap |
private IOFHandler.Role |
role
This field is used to exchange information with switch.
|
private java.lang.String |
stringId |
private TimedCache<java.lang.Long> |
timedCache |
private java.util.concurrent.atomic.AtomicInteger |
transactionIdSource |
private byte |
version |
PROP_FASTWILDCARDS, PROP_REQUIRES_L3_MATCH, PROP_SUPPORTS_NETMASK_TBL, PROP_SUPPORTS_OFPP_FLOOD, PROP_SUPPORTS_OFPP_TABLE, SWITCH_DESCRIPTION_DATA, SWITCH_DESCRIPTION_FUTURE, SWITCH_IS_CORE_SWITCH, SWITCH_SUPPORTS_NX_ROLE
Constructor and Description |
---|
OFSwitchImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Set properties for switch specific behavior
|
java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> |
getAttributes()
Retrieves attributes of this switch
|
java.util.Date |
getConnectedSince()
Retrieves the date the switch connected to this controller
|
Connection |
getConnection() |
long |
getId()
Get the datapathId of the switch
|
java.net.SocketAddress |
getInetAddress() |
int |
getNextTransactionId()
Returns the next available transaction id
|
java.util.Map<java.lang.Short,java.lang.Long> |
getPortBroadcastHits()
Get the portBroadcastCacheHits
|
IOFHandler.Role |
getRole()
Get the current role of the controller for the switch
|
java.lang.String |
getStringId()
Get a string version of the ID for this switch
|
byte |
getVersion()
Get the version of the switch
|
boolean |
hasAttribute(java.lang.String name)
Checks if a specific switch property exists for this switch
|
boolean |
isActive()
Check if the controller is an active controller for the switch.
|
boolean |
isConnected()
Check if the switch is still connected;
Only call while holding processMessageLock
|
java.lang.Object |
removeAttribute(java.lang.String name)
Set properties for switch specific behavior
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set properties for switch specific behavior
|
void |
setConnection(Connection conn) |
void |
setId(long id)
Set the datapath id of the switch
|
void |
setVersion(byte v)
Set the version of the switch
|
java.lang.String |
toString() |
boolean |
updateBroadcastCache(java.lang.Long entry,
java.lang.Short port)
Update broadcast cache
|
private static final java.lang.String HA_CHECK_SWITCH
private byte version
private java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> attributes
private java.util.Date connectedSince
private Connection conn
private java.lang.String stringId
private java.util.concurrent.atomic.AtomicInteger transactionIdSource
private IOFHandler.Role role
private TimedCache<java.lang.Long> timedCache
private java.util.concurrent.ConcurrentMap<java.lang.Short,java.lang.Long> portBroadcastCacheHitMap
private long datapathId
public void setVersion(byte v)
IOFSwitch
setVersion
in interface IOFSwitch
v
- version number (byte)public byte getVersion()
IOFSwitch
getVersion
in interface IOFSwitch
public void setConnection(Connection conn)
setConnection
in interface IOFSwitch
public Connection getConnection()
getConnection
in interface IOFSwitch
public java.lang.Object getAttribute(java.lang.String name)
IOFSwitch
getAttribute
in interface IOFSwitch
name
- name of propertypublic void setAttribute(java.lang.String name, java.lang.Object value)
IOFSwitch
setAttribute
in interface IOFSwitch
name
- name of propertyvalue
- value for namepublic java.lang.Object removeAttribute(java.lang.String name)
IOFSwitch
removeAttribute
in interface IOFSwitch
name
- name of propertypublic boolean hasAttribute(java.lang.String name)
IOFSwitch
hasAttribute
in interface IOFSwitch
name
- name of propertypublic long getId()
IOFSwitch
public void setId(long id)
IOFSwitch
public java.lang.String getStringId()
IOFSwitch
getStringId
in interface IOFSwitch
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> getAttributes()
IOFSwitch
getAttributes
in interface IOFSwitch
public java.util.Date getConnectedSince()
IOFSwitch
getConnectedSince
in interface IOFSwitch
public int getNextTransactionId()
IOFSwitch
getNextTransactionId
in interface IOFSwitch
public boolean isConnected()
IOFSwitch
isConnected
in interface IOFSwitch
public IOFHandler.Role getRole()
IOFSwitch
public boolean isActive()
IOFSwitch
public java.util.Map<java.lang.Short,java.lang.Long> getPortBroadcastHits()
IOFSwitch
getPortBroadcastHits
in interface IOFSwitch
public java.net.SocketAddress getInetAddress()
public boolean updateBroadcastCache(java.lang.Long entry, java.lang.Short port)
IOFSwitch
updateBroadcastCache
in interface IOFSwitch
entry
- Longport
- Short