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
ConstructorsConstructorDescriptionForwardingRulesManagerImpl(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()voidaddRecoverableListener(org.opendaylight.serviceutils.srm.RecoverableListener recoverableListener) Method for register RecoverableListener.booleancheckNodeInOperationalDataStore(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Method returns information : "is Node with send InstanceIdentifier present in operational data store"?.voidclose()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 theFlowNodeReconciliationassociated 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.ReadTransactionMethod returns Read Transaction.intReturn number of reconciliation retry are allowed.Content definition method and prevent code duplicity.booleanholds the value read from the configuration file openflowplugin.cfg file.booleanisNodeActive(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Method returns information : "is Node with send InstanceIdentifier connected"?.booleanisNodeOwner(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Method checks if *this* instance of openflowplugin is owner of the given openflow node.booleanCheck if reconciliation is disabled by user.booleanCheck if stale marking is enabled for switch reconciliation.voidonPropertyChanged(@NonNull String propertyName, @NonNull String propertyValue) Method invoked on configuration property change.voidsetDeviceMastershipManager(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:
closein interfaceAutoCloseable- Throws:
Exception
-
getReadTransaction
public org.opendaylight.mdsal.binding.api.ReadTransaction getReadTransaction()Description copied from interface:ForwardingRulesManagerMethod returns Read Transaction. It is need for Node reconciliation only.- Specified by:
getReadTransactionin interfaceForwardingRulesManager- Returns:
- ReadOnlyTransaction
-
getNewTransactionId
Description copied from interface:ForwardingRulesManagerMethod returns generated transaction ID, which is unique for every transaction. ID is composite from prefix ("DOM") and unique number.- Specified by:
getNewTransactionIdin interfaceForwardingRulesManager- Returns:
- String transactionID for RPC transaction identification
-
isNodeActive
public boolean isNodeActive(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> ident) Description copied from interface:ForwardingRulesManagerMethod returns information : "is Node with send InstanceIdentifier connected"?.- Specified by:
isNodeActivein 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:ForwardingRulesManagerMethod returns information : "is Node with send InstanceIdentifier present in operational data store"?.- Specified by:
checkNodeInOperationalDataStorein interfaceForwardingRulesManager- Parameters:
ident- - the key of the node- Returns:
- boolean - true if device is present in operational data store
-
addFlow
- Specified by:
addFlowin interfaceForwardingRulesManager
-
removeFlow
- Specified by:
removeFlowin interfaceForwardingRulesManager
-
updateFlow
- Specified by:
updateFlowin interfaceForwardingRulesManager
-
addGroup
- Specified by:
addGroupin interfaceForwardingRulesManager
-
removeGroup
- Specified by:
removeGroupin interfaceForwardingRulesManager
-
updateGroup
- Specified by:
updateGroupin interfaceForwardingRulesManager
-
addMeter
- Specified by:
addMeterin interfaceForwardingRulesManager
-
removeMeter
- Specified by:
removeMeterin interfaceForwardingRulesManager
-
updateMeter
- Specified by:
updateMeterin interfaceForwardingRulesManager
-
updateTable
- Specified by:
updateTablein interfaceForwardingRulesManager
-
controlBundle
- Specified by:
controlBundlein interfaceForwardingRulesManager
-
addBundleMessages
- Specified by:
addBundleMessagesin interfaceForwardingRulesManager
-
getActiveBundle
- Specified by:
getActiveBundlein interfaceForwardingRulesManager
-
getDevicesGroupRegistry
Description copied from interface:ForwardingRulesManagerReturn Devices Group Registry which can be used to track the groups present in a device.- Specified by:
getDevicesGroupRegistryin interfaceForwardingRulesManager- Returns:
- devicesGroupRegistry
-
getFlowCommiter
Description copied from interface:ForwardingRulesManagerContent definition method and prevent code duplicity in Reconcil.- Specified by:
getFlowCommiterin interfaceForwardingRulesManager- Returns:
- ForwardingRulesCommiter<Flow>.
-
getGroupCommiter
Description copied from interface:ForwardingRulesManagerContent definition method and prevent code duplicity in Reconcil.- Specified by:
getGroupCommiterin interfaceForwardingRulesManager- Returns:
- ForwardingRulesCommiter<Group>
-
getMeterCommiter
Description copied from interface:ForwardingRulesManagerContent definition method and prevent code duplicity.- Specified by:
getMeterCommiterin interfaceForwardingRulesManager- Returns:
- ForwardingRulesCommiter<Meter>
-
getTableFeaturesCommiter
Description copied from interface:ForwardingRulesManagerContent definition method and prevent code duplicity.- Specified by:
getTableFeaturesCommiterin interfaceForwardingRulesManager- Returns:
- ForwardingRulesCommiter<Table>
-
getBundleFlowListener
Description copied from interface:ForwardingRulesManagerReturn BundleFlowListener instance.- Specified by:
getBundleFlowListenerin interfaceForwardingRulesManager- Returns:
- BundleFlowListener
-
getBundleGroupListener
Description copied from interface:ForwardingRulesManagerReturn BundleGroupListener instance.- Specified by:
getBundleGroupListenerin interfaceForwardingRulesManager- Returns:
- BundleGroupListener
-
isReconciliationDisabled
public boolean isReconciliationDisabled()Description copied from interface:ForwardingRulesManagerCheck if reconciliation is disabled by user.- Specified by:
isReconciliationDisabledin interfaceForwardingRulesManager- Returns:
- true if reconciliation is disabled, else false
-
isStaleMarkingEnabled
public boolean isStaleMarkingEnabled()Description copied from interface:ForwardingRulesManagerCheck if stale marking is enabled for switch reconciliation.- Specified by:
isStaleMarkingEnabledin interfaceForwardingRulesManager- Returns:
- true if stale marking is enabled, else false
-
getReconciliationRetryCount
public int getReconciliationRetryCount()Description copied from interface:ForwardingRulesManagerReturn number of reconciliation retry are allowed.- Specified by:
getReconciliationRetryCountin interfaceForwardingRulesManager- Returns:
- number of retries.
-
addRecoverableListener
public void addRecoverableListener(org.opendaylight.serviceutils.srm.RecoverableListener recoverableListener) Description copied from interface:ForwardingRulesManagerMethod for register RecoverableListener.- Specified by:
addRecoverableListenerin interfaceForwardingRulesManager
-
getFlowNodeConnectorInventoryTranslatorImpl
Description copied from interface:ForwardingRulesManagerContent definition method and prevent code duplicity.- Specified by:
getFlowNodeConnectorInventoryTranslatorImplin interfaceForwardingRulesManager- Returns:
- FlowNodeConnectorInventoryTranslatorImpl
-
getNodeConfigurator
Description copied from interface:ForwardingRulesManagerReturn the NodeConfigurator which could be used to serialize jobs.- Specified by:
getNodeConfiguratorin interfaceForwardingRulesManager- Returns:
- modeConfigurator.
-
getFlowNodeReconciliation
Description copied from interface:ForwardingRulesManagerReturn theFlowNodeReconciliationassociated with this manager.- Specified by:
getFlowNodeReconciliationin interfaceForwardingRulesManager- Returns:
- the FlowNodeReconciliation
-
isBundleBasedReconciliationEnabled
public boolean isBundleBasedReconciliationEnabled()Description copied from interface:ForwardingRulesManagerholds the value read from the configuration file openflowplugin.cfg file.- Specified by:
isBundleBasedReconciliationEnabledin 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:ForwardingRulesManagerMethod checks if *this* instance of openflowplugin is owner of the given openflow node.- Specified by:
isNodeOwnerin interfaceForwardingRulesManager- Returns:
- True if owner, else false
-
setDeviceMastershipManager
-
onPropertyChanged
Description copied from interface:ConfigurationListenerMethod invoked on configuration property change.- Specified by:
onPropertyChangedin interfaceConfigurationListener- Parameters:
propertyName- the property namepropertyValue- the property value
-