Class ForwardingRulesManagerImpl
java.lang.Object
org.opendaylight.openflowplugin.applications.frm.impl.ForwardingRulesManagerImpl
- All Implemented Interfaces:
AutoCloseable
,ConfigurationListener
,ForwardingRulesManager
@Singleton
public final class ForwardingRulesManagerImpl
extends Object
implements ForwardingRulesManager, AutoCloseable
Manager and middle point for whole module. It contains ActiveNodeHolder and provide all RPC services.
-
Constructor Summary
ConstructorDescriptionForwardingRulesManagerImpl
(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.mdsal.binding.api.RpcService rpcRegistry, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, ForwardingRulesManagerConfig config, MastershipChangeServiceManager mastershipChangeServiceManager, ConfigurationService configurationService, ReconciliationManager reconciliationManager, OpenflowServiceRecoveryHandler openflowServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, FlowGroupCacheManager flowGroupCacheManager) -
Method Summary
Modifier and TypeMethodDescriptionaddFlow()
addGroup()
addMeter()
void
addRecoverableListener
(org.opendaylight.serviceutils.srm.RecoverableListener recoverableListener) Method for register RecoverableListener.boolean
checkNodeInOperationalDataStore
(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Method returns information : "is Node with send InstanceIdentifier present in operational data store"?.void
close()
Return BundleFlowListener instance.Return BundleGroupListener instance.Return Devices Group Registry which can be used to track the groups present in a device.Content definition method and prevent code duplicity in Reconcil.Content definition method and prevent code duplicity.Return theFlowNodeReconciliation
associated with this manager.Content definition method and prevent code duplicity in Reconcil.Content definition method and prevent code duplicity.Method returns generated transaction ID, which is unique for every transaction.Return the NodeConfigurator which could be used to serialize jobs.org.opendaylight.mdsal.binding.api.ReadTransaction
Method returns Read Transaction.int
Return number of reconciliation retry are allowed.Content definition method and prevent code duplicity.boolean
holds the value read from the configuration file openflowplugin.cfg file.boolean
isNodeActive
(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Method returns information : "is Node with send InstanceIdentifier connected"?.boolean
isNodeOwner
(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Method checks if *this* instance of openflowplugin is owner of the given openflow node.boolean
Check if reconciliation is disabled by user.boolean
Check if stale marking is enabled for switch reconciliation.void
onPropertyChanged
(@NonNull String propertyName, @NonNull String propertyValue) Method invoked on configuration property change.void
setDeviceMastershipManager
(DeviceMastershipManager deviceMastershipManager) @NonNull UpdateFlow
-
Constructor Details
-
ForwardingRulesManagerImpl
@Inject public ForwardingRulesManagerImpl(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.mdsal.binding.api.RpcService rpcRegistry, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, ForwardingRulesManagerConfig config, MastershipChangeServiceManager mastershipChangeServiceManager, ConfigurationService configurationService, ReconciliationManager reconciliationManager, OpenflowServiceRecoveryHandler openflowServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, FlowGroupCacheManager flowGroupCacheManager)
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getReadTransaction
public org.opendaylight.mdsal.binding.api.ReadTransaction getReadTransaction()Description copied from interface:ForwardingRulesManager
Method returns Read Transaction. It is need for Node reconciliation only.- Specified by:
getReadTransaction
in interfaceForwardingRulesManager
- Returns:
- ReadOnlyTransaction
-
getNewTransactionId
Description copied from interface:ForwardingRulesManager
Method returns generated transaction ID, which is unique for every transaction. ID is composite from prefix ("DOM") and unique number.- Specified by:
getNewTransactionId
in interfaceForwardingRulesManager
- Returns:
- String transactionID for RPC transaction identification
-
isNodeActive
public boolean isNodeActive(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Description copied from interface:ForwardingRulesManager
Method returns information : "is Node with send InstanceIdentifier connected"?.- Specified by:
isNodeActive
in interfaceForwardingRulesManager
- Parameters:
ident
- - the key of the node- Returns:
- boolean - true if device is connected
-
checkNodeInOperationalDataStore
public boolean checkNodeInOperationalDataStore(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Description copied from interface:ForwardingRulesManager
Method returns information : "is Node with send InstanceIdentifier present in operational data store"?.- Specified by:
checkNodeInOperationalDataStore
in interfaceForwardingRulesManager
- Parameters:
ident
- - the key of the node- Returns:
- boolean - true if device is present in operational data store
-
addFlow
- Specified by:
addFlow
in interfaceForwardingRulesManager
-
removeFlow
- Specified by:
removeFlow
in interfaceForwardingRulesManager
-
updateFlow
- Specified by:
updateFlow
in interfaceForwardingRulesManager
-
addGroup
- Specified by:
addGroup
in interfaceForwardingRulesManager
-
removeGroup
- Specified by:
removeGroup
in interfaceForwardingRulesManager
-
updateGroup
- Specified by:
updateGroup
in interfaceForwardingRulesManager
-
addMeter
- Specified by:
addMeter
in interfaceForwardingRulesManager
-
removeMeter
- Specified by:
removeMeter
in interfaceForwardingRulesManager
-
updateMeter
- Specified by:
updateMeter
in interfaceForwardingRulesManager
-
updateTable
- Specified by:
updateTable
in interfaceForwardingRulesManager
-
controlBundle
- Specified by:
controlBundle
in interfaceForwardingRulesManager
-
addBundleMessages
- Specified by:
addBundleMessages
in interfaceForwardingRulesManager
-
getActiveBundle
- Specified by:
getActiveBundle
in interfaceForwardingRulesManager
-
getDevicesGroupRegistry
Description copied from interface:ForwardingRulesManager
Return Devices Group Registry which can be used to track the groups present in a device.- Specified by:
getDevicesGroupRegistry
in interfaceForwardingRulesManager
- Returns:
- devicesGroupRegistry
-
getFlowCommiter
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity in Reconcil.- Specified by:
getFlowCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Flow>.
-
getGroupCommiter
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity in Reconcil.- Specified by:
getGroupCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Group>
-
getMeterCommiter
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity.- Specified by:
getMeterCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Meter>
-
getTableFeaturesCommiter
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity.- Specified by:
getTableFeaturesCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Table>
-
getBundleFlowListener
Description copied from interface:ForwardingRulesManager
Return BundleFlowListener instance.- Specified by:
getBundleFlowListener
in interfaceForwardingRulesManager
- Returns:
- BundleFlowListener
-
getBundleGroupListener
Description copied from interface:ForwardingRulesManager
Return BundleGroupListener instance.- Specified by:
getBundleGroupListener
in interfaceForwardingRulesManager
- Returns:
- BundleGroupListener
-
isReconciliationDisabled
public boolean isReconciliationDisabled()Description copied from interface:ForwardingRulesManager
Check if reconciliation is disabled by user.- Specified by:
isReconciliationDisabled
in interfaceForwardingRulesManager
- Returns:
- true if reconciliation is disabled, else false
-
isStaleMarkingEnabled
public boolean isStaleMarkingEnabled()Description copied from interface:ForwardingRulesManager
Check if stale marking is enabled for switch reconciliation.- Specified by:
isStaleMarkingEnabled
in interfaceForwardingRulesManager
- Returns:
- true if stale marking is enabled, else false
-
getReconciliationRetryCount
public int getReconciliationRetryCount()Description copied from interface:ForwardingRulesManager
Return number of reconciliation retry are allowed.- Specified by:
getReconciliationRetryCount
in interfaceForwardingRulesManager
- Returns:
- number of retries.
-
addRecoverableListener
public void addRecoverableListener(org.opendaylight.serviceutils.srm.RecoverableListener recoverableListener) Description copied from interface:ForwardingRulesManager
Method for register RecoverableListener.- Specified by:
addRecoverableListener
in interfaceForwardingRulesManager
-
getFlowNodeConnectorInventoryTranslatorImpl
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity.- Specified by:
getFlowNodeConnectorInventoryTranslatorImpl
in interfaceForwardingRulesManager
- Returns:
- FlowNodeConnectorInventoryTranslatorImpl
-
getNodeConfigurator
Description copied from interface:ForwardingRulesManager
Return the NodeConfigurator which could be used to serialize jobs.- Specified by:
getNodeConfigurator
in interfaceForwardingRulesManager
- Returns:
- modeConfigurator.
-
getFlowNodeReconciliation
Description copied from interface:ForwardingRulesManager
Return theFlowNodeReconciliation
associated with this manager.- Specified by:
getFlowNodeReconciliation
in interfaceForwardingRulesManager
- Returns:
- the FlowNodeReconciliation
-
isBundleBasedReconciliationEnabled
public boolean isBundleBasedReconciliationEnabled()Description copied from interface:ForwardingRulesManager
holds the value read from the configuration file openflowplugin.cfg file.- Specified by:
isBundleBasedReconciliationEnabled
in interfaceForwardingRulesManager
- Returns:
- True if user enables bundle-based-reconciliation-enabled field in config file or False
-
isNodeOwner
public boolean isNodeOwner(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Description copied from interface:ForwardingRulesManager
Method checks if *this* instance of openflowplugin is owner of the given openflow node.- Specified by:
isNodeOwner
in interfaceForwardingRulesManager
- Returns:
- True if owner, else false
-
setDeviceMastershipManager
-
onPropertyChanged
Description copied from interface:ConfigurationListener
Method invoked on configuration property change.- Specified by:
onPropertyChanged
in interfaceConfigurationListener
- Parameters:
propertyName
- the property namepropertyValue
- the property value
-