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)
IOFSwitchsetVersion in interface IOFSwitchv - version number (byte)public byte getVersion()
IOFSwitchgetVersion in interface IOFSwitchpublic void setConnection(Connection conn)
setConnection in interface IOFSwitchpublic Connection getConnection()
getConnection in interface IOFSwitchpublic java.lang.Object getAttribute(java.lang.String name)
IOFSwitchgetAttribute in interface IOFSwitchname - name of propertypublic void setAttribute(java.lang.String name,
java.lang.Object value)
IOFSwitchsetAttribute in interface IOFSwitchname - name of propertyvalue - value for namepublic java.lang.Object removeAttribute(java.lang.String name)
IOFSwitchremoveAttribute in interface IOFSwitchname - name of propertypublic boolean hasAttribute(java.lang.String name)
IOFSwitchhasAttribute in interface IOFSwitchname - name of propertypublic long getId()
IOFSwitchpublic void setId(long id)
IOFSwitchpublic java.lang.String getStringId()
IOFSwitchgetStringId in interface IOFSwitchpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> getAttributes()
IOFSwitchgetAttributes in interface IOFSwitchpublic java.util.Date getConnectedSince()
IOFSwitchgetConnectedSince in interface IOFSwitchpublic int getNextTransactionId()
IOFSwitchgetNextTransactionId in interface IOFSwitchpublic boolean isConnected()
IOFSwitchisConnected in interface IOFSwitchpublic IOFHandler.Role getRole()
IOFSwitchpublic boolean isActive()
IOFSwitchpublic java.util.Map<java.lang.Short,java.lang.Long> getPortBroadcastHits()
IOFSwitchgetPortBroadcastHits in interface IOFSwitchpublic java.net.SocketAddress getInetAddress()
public boolean updateBroadcastCache(java.lang.Long entry,
java.lang.Short port)
IOFSwitchupdateBroadcastCache in interface IOFSwitchentry - Longport - Short