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
forwardingrules-manager org.opendaylight.openflowplugin.applications.frm.impl
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.RpcConsumerRegistry rpcRegistry, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, ForwardingRulesManagerConfig config, MastershipChangeServiceManager mastershipChangeServiceManager, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonService, ConfigurationService configurationService, ReconciliationManager reconciliationManager, OpenflowServiceRecoveryHandler openflowServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, FlowGroupCacheManager flowGroupCacheManager, ListenerRegistrationHelper registrationHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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()
Method exposes the ArbitratorReconciliationManager service used for performing Arbitrator Based Reconciliation.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.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.Bundle RPC service.Flow RPC service.Group RPC service.Meter RPC service.Table RPC service.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) void
start()
-
Constructor Details
-
ForwardingRulesManagerImpl
@Inject public ForwardingRulesManagerImpl(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.mdsal.binding.api.RpcConsumerRegistry rpcRegistry, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, ForwardingRulesManagerConfig config, MastershipChangeServiceManager mastershipChangeServiceManager, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonService, ConfigurationService configurationService, ReconciliationManager reconciliationManager, OpenflowServiceRecoveryHandler openflowServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, FlowGroupCacheManager flowGroupCacheManager, ListenerRegistrationHelper registrationHelper)
-
-
Method Details
-
start
@PostConstruct public void start()- Specified by:
start
in interfaceForwardingRulesManager
-
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
-
getSalFlowService
Description copied from interface:ForwardingRulesManager
Flow RPC service.- Specified by:
getSalFlowService
in interfaceForwardingRulesManager
-
getSalGroupService
Description copied from interface:ForwardingRulesManager
Group RPC service.- Specified by:
getSalGroupService
in interfaceForwardingRulesManager
-
getSalMeterService
Description copied from interface:ForwardingRulesManager
Meter RPC service.- Specified by:
getSalMeterService
in interfaceForwardingRulesManager
-
getSalTableService
Description copied from interface:ForwardingRulesManager
Table RPC service.- Specified by:
getSalTableService
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
-
getSalBundleService
Description copied from interface:ForwardingRulesManager
Bundle RPC service.- Specified by:
getSalBundleService
in interfaceForwardingRulesManager
- Returns:
- salBundleService
-
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
-
getArbitratorReconciliationManager
Description copied from interface:ForwardingRulesManager
Method exposes the ArbitratorReconciliationManager service used for performing Arbitrator Based Reconciliation.- Specified by:
getArbitratorReconciliationManager
in interfaceForwardingRulesManager
- Returns:
- ArbitratorReconciliationManager
-
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.
-
getNodeListener
-
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
-