|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.floodlightcontroller.flowcache.FlowReconcileManager
public class FlowReconcileManager
Field Summary | |
---|---|
protected ICounterStoreService |
counterStore
|
protected IDebugCounterService |
debugCounters
|
protected static java.lang.String |
EnableConfigKey
Config to enable or disable flowReconcile |
protected static int |
FLOW_RECONCILE_DELAY_MILLISEC
start flow reconcile in 10ms after a new reconcile request is received. |
protected boolean |
flowReconcileEnabled
|
protected ListenerDispatcher<OFType,IFlowReconcileListener> |
flowReconcileListeners
The list of flow reconcile listeners that have registered to get flow reconcile callbacks. |
protected SingletonTask |
flowReconcileTask
Asynchronous task to feed the flowReconcile pipeline |
java.util.concurrent.atomic.AtomicInteger |
flowReconcileThreadRunCount
|
protected SimpleCounter |
lastPacketInCounter
|
protected java.util.Date |
lastReconcileTime
|
protected static int |
MAX_SYSTEM_LOAD_PER_SECOND
|
protected static int |
MIN_FLOW_RECONCILE_PER_SECOND
a minimum flow reconcile rate so that it won't stave |
static java.lang.String |
PACKAGE
|
protected IThreadPoolService |
threadPool
Reference to dependent modules |
Constructor Summary | |
---|---|
FlowReconcileManager()
|
Method Summary | |
---|---|
void |
addFlowReconcileListener(IFlowReconcileListener listener)
Add a flow reconcile listener |
void |
clearFlowReconcileListeners()
Remove all flow reconcile listeners |
protected boolean |
doReconcile()
Feed the flows into the flow reconciliation pipeline. |
protected int |
getCurrentCapacity()
Compute the maximum number of flows to be reconciled. |
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleDependencies()
Get a list of Modules that this module depends on. |
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleServices()
Return the list of interfaces that this module implements. |
protected int |
getPktInRate(ICounter newCnt,
java.util.Date currentTime)
|
java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> |
getServiceImpls()
Instantiate (as needed) and return objects that implement each of the services exported by this module. |
void |
init(FloodlightModuleContext context)
This is a hook for each module to do its internal initialization, e.g., call setService(context.getService("Service")) All module dependencies are resolved when this is called, but not every module is initialized. |
void |
reconcileFlow(OFMatchReconcile ofmRcIn,
PriorityPendingQueue.EventPriority priority)
Add to-be-reconciled flow to the queue. |
void |
removeFlowReconcileListener(IFlowReconcileListener listener)
Remove a flow reconcile listener |
void |
startUp(FloodlightModuleContext context)
This is a hook for each module to do its external initializations, e.g., register for callbacks or query for state in other modules It is expected that this function will not block and that modules that want non-event driven CPU will spawn their own threads. |
protected void |
updateFlush()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IThreadPoolService threadPool
protected ICounterStoreService counterStore
protected IDebugCounterService debugCounters
protected ListenerDispatcher<OFType,IFlowReconcileListener> flowReconcileListeners
protected SingletonTask flowReconcileTask
protected SimpleCounter lastPacketInCounter
protected static final int MAX_SYSTEM_LOAD_PER_SECOND
protected static final int MIN_FLOW_RECONCILE_PER_SECOND
protected static final int FLOW_RECONCILE_DELAY_MILLISEC
protected java.util.Date lastReconcileTime
protected static final java.lang.String EnableConfigKey
public static final java.lang.String PACKAGE
protected boolean flowReconcileEnabled
public java.util.concurrent.atomic.AtomicInteger flowReconcileThreadRunCount
Constructor Detail |
---|
public FlowReconcileManager()
Method Detail |
---|
public void addFlowReconcileListener(IFlowReconcileListener listener)
IFlowReconcileService
addFlowReconcileListener
in interface IFlowReconcileService
listener
- The module that can reconcile flowspublic void removeFlowReconcileListener(IFlowReconcileListener listener)
IFlowReconcileService
removeFlowReconcileListener
in interface IFlowReconcileService
listener
- The module that no longer reconcile flowspublic void clearFlowReconcileListeners()
IFlowReconcileService
clearFlowReconcileListeners
in interface IFlowReconcileService
public void reconcileFlow(OFMatchReconcile ofmRcIn, PriorityPendingQueue.EventPriority priority)
reconcileFlow
in interface IFlowReconcileService
ofmRcIn
- the ofm rc inpublic java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleServices()
IFloodlightModule
getModuleServices
in interface IFloodlightModule
public java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> getServiceImpls()
IFloodlightModule
getServiceImpls
in interface IFloodlightModule
public java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleDependencies()
IFloodlightModule
getModuleDependencies
in interface IFloodlightModule
public void init(FloodlightModuleContext context) throws FloodlightModuleException
IFloodlightModule
init
in interface IFloodlightModule
init
in interface IFlowReconcileService
FloodlightModuleException
public void startUp(FloodlightModuleContext context)
IFloodlightModule
startUp
in interface IFloodlightModule
startUp
in interface IFlowReconcileService
protected void updateFlush()
protected boolean doReconcile()
protected int getCurrentCapacity()
protected int getPktInRate(ICounter newCnt, java.util.Date currentTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |