Modifier and Type | Field and Description |
---|---|
protected int |
activeEntries |
protected ConcurrentHashMap<Integer,Long> |
cookieMap |
protected ConcurrentHashMap<Long,OVXFlowMod> |
flowmodMap |
protected long |
lookupCount |
protected long |
matchCount |
protected OVXSwitch |
vswitch |
Constructor and Description |
---|
OVXFlowTable(OVXSwitch vsw)
Instantiates a new flow table associated to the given
virtual switch.
|
Modifier and Type | Method and Description |
---|---|
long |
addFlowMod(OVXFlowMod flowmod,
long cookie)
Adds the given flow mod and associate it to the given cookie.
|
OVXFlowMod |
deleteFlowMod(Long cookie)
Deletes the flow mod associated with the given cookie.
|
void |
dump()
Dumps the contents of the FlowTable.
|
long |
getCookie()
Gets a new cookie.
|
long |
getCookie(OVXFlowMod flowmod,
Boolean cflag)
Gets a cookie based on the given flow mod.
|
OVXFlowMod |
getFlowMod(Long cookie)
Gets a copy of the FlowMod out of the flow table without removing it.
|
Collection<OVXFlowMod> |
getFlowTable()
Gets an unmodifiable view of the flow table.
|
boolean |
handleFlowMods(OVXFlowMod fm)
Processes FlowMods according to command field, writing out FlowMods south
if needed.
|
boolean |
hasFlowMod(long cookie)
Checks if the cookie is present in the flow table.
|
boolean |
isEmpty()
Checks if the flow table is empty.
|
protected OVXSwitch vswitch
protected ConcurrentHashMap<Long,OVXFlowMod> flowmodMap
protected ConcurrentHashMap<Integer,Long> cookieMap
protected int activeEntries
protected long lookupCount
protected long matchCount
public OVXFlowTable(OVXSwitch vsw)
vsw
- the virtual switchpublic boolean isEmpty()
public boolean handleFlowMods(OVXFlowMod fm)
handleFlowMods
in interface FlowTable
fm
- The FlowMod to apply to this tablepublic OVXFlowMod getFlowMod(Long cookie) throws MappingException
getFlowMod
in interface FlowTable
cookie
- the physical cookieMappingException
- if the cookie is not foundpublic boolean hasFlowMod(long cookie)
hasFlowMod
in interface FlowTable
cookie
- the cookiepublic long getCookie()
public final long getCookie(OVXFlowMod flowmod, Boolean cflag)
flowmod
- the flow modcflag
- TODOpublic long addFlowMod(OVXFlowMod flowmod, long cookie)
addFlowMod
in interface FlowTable
flowmod
- the flow modcookie
- the cookiepublic OVXFlowMod deleteFlowMod(Long cookie)
deleteFlowMod
in interface FlowTable
cookie
- the cookiepublic void dump()
public Collection<OVXFlowMod> getFlowTable()
getFlowTable
in interface FlowTable
Copyright © 2015. All rights reserved.