Class ForwardingRulesManagerImpl
- java.lang.Object
-
- org.opendaylight.openflowplugin.applications.frm.impl.ForwardingRulesManagerImpl
-
- All Implemented Interfaces:
AutoCloseable
,ConfigurationListener
,ForwardingRulesManager
@Singleton public class ForwardingRulesManagerImpl extends Object implements ForwardingRulesManager
forwardingrules-manager org.opendaylight.openflowplugin.applications.frm.implManager and middle point for whole module. It contains ActiveNodeHolder and provide all RPC services.
-
-
Constructor Summary
Constructors Constructor Description 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
ArbitratorReconcileService
getArbitratorReconciliationManager()
Method exposes the ArbitratorReconciliationManager service used for performing Arbitrator Based Reconciliation.BundleMessagesCommiter<Flow>
getBundleFlowListener()
Return BundleFlowListener instance.BundleMessagesCommiter<Group>
getBundleGroupListener()
Return BundleGroupListener instance.DevicesGroupRegistry
getDevicesGroupRegistry()
Return Devices Group Registry which can be used to track the groups present in a device.ForwardingRulesCommiter<Flow>
getFlowCommiter()
Content definition method and prevent code duplicity in Reconcil.FlowNodeConnectorInventoryTranslatorImpl
getFlowNodeConnectorInventoryTranslatorImpl()
Content definition method and prevent code duplicity.ForwardingRulesCommiter<Group>
getGroupCommiter()
Content definition method and prevent code duplicity in Reconcil.ForwardingRulesCommiter<Meter>
getMeterCommiter()
Content definition method and prevent code duplicity.String
getNewTransactionId()
Method returns generated transaction ID, which is unique for every transaction.NodeConfigurator
getNodeConfigurator()
Return the NodeConfigurator which could be used to serialize jobs.FlowNodeReconciliation
getNodeListener()
org.opendaylight.mdsal.binding.api.ReadTransaction
getReadTransaction()
Method returns Read Transaction.int
getReconciliationRetryCount()
Return number of reconciliation retry are allowed.SalBundleService
getSalBundleService()
Bundle RPC service.SalFlowService
getSalFlowService()
Flow RPC service.SalGroupService
getSalGroupService()
Group RPC service.SalMeterService
getSalMeterService()
Meter RPC service.SalTableService
getSalTableService()
Table RPC service.ForwardingRulesCommiter<TableFeatures>
getTableFeaturesCommiter()
Content definition method and prevent code duplicity.boolean
isBundleBasedReconciliationEnabled()
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
isReconciliationDisabled()
Check if reconciliation is disabled by user.boolean
isStaleMarkingEnabled()
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 Detail
-
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)
-
-
Method Detail
-
start
@PostConstruct public void start()
- Specified by:
start
in interfaceForwardingRulesManager
-
close
@PreDestroy public void close() throws Exception
- 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
public String 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
public SalFlowService getSalFlowService()
Description copied from interface:ForwardingRulesManager
Flow RPC service.- Specified by:
getSalFlowService
in interfaceForwardingRulesManager
-
getSalGroupService
public SalGroupService getSalGroupService()
Description copied from interface:ForwardingRulesManager
Group RPC service.- Specified by:
getSalGroupService
in interfaceForwardingRulesManager
-
getSalMeterService
public SalMeterService getSalMeterService()
Description copied from interface:ForwardingRulesManager
Meter RPC service.- Specified by:
getSalMeterService
in interfaceForwardingRulesManager
-
getSalTableService
public SalTableService getSalTableService()
Description copied from interface:ForwardingRulesManager
Table RPC service.- Specified by:
getSalTableService
in interfaceForwardingRulesManager
-
getDevicesGroupRegistry
public DevicesGroupRegistry 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
public SalBundleService getSalBundleService()
Description copied from interface:ForwardingRulesManager
Bundle RPC service.- Specified by:
getSalBundleService
in interfaceForwardingRulesManager
- Returns:
- salBundleService
-
getFlowCommiter
public ForwardingRulesCommiter<Flow> getFlowCommiter()
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity in Reconcil.- Specified by:
getFlowCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Flow>.
-
getGroupCommiter
public ForwardingRulesCommiter<Group> getGroupCommiter()
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity in Reconcil.- Specified by:
getGroupCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Group>
-
getMeterCommiter
public ForwardingRulesCommiter<Meter> getMeterCommiter()
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity.- Specified by:
getMeterCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Meter>
-
getTableFeaturesCommiter
public ForwardingRulesCommiter<TableFeatures> getTableFeaturesCommiter()
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity.- Specified by:
getTableFeaturesCommiter
in interfaceForwardingRulesManager
- Returns:
- ForwardingRulesCommiter<Table>
-
getBundleFlowListener
public BundleMessagesCommiter<Flow> getBundleFlowListener()
Description copied from interface:ForwardingRulesManager
Return BundleFlowListener instance.- Specified by:
getBundleFlowListener
in interfaceForwardingRulesManager
- Returns:
- BundleFlowListener
-
getBundleGroupListener
public BundleMessagesCommiter<Group> getBundleGroupListener()
Description copied from interface:ForwardingRulesManager
Return BundleGroupListener instance.- Specified by:
getBundleGroupListener
in interfaceForwardingRulesManager
- Returns:
- BundleGroupListener
-
getArbitratorReconciliationManager
public ArbitratorReconcileService 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
public FlowNodeConnectorInventoryTranslatorImpl getFlowNodeConnectorInventoryTranslatorImpl()
Description copied from interface:ForwardingRulesManager
Content definition method and prevent code duplicity.- Specified by:
getFlowNodeConnectorInventoryTranslatorImpl
in interfaceForwardingRulesManager
- Returns:
- FlowNodeConnectorInventoryTranslatorImpl
-
getNodeConfigurator
public NodeConfigurator getNodeConfigurator()
Description copied from interface:ForwardingRulesManager
Return the NodeConfigurator which could be used to serialize jobs.- Specified by:
getNodeConfigurator
in interfaceForwardingRulesManager
- Returns:
- modeConfigurator.
-
getNodeListener
public FlowNodeReconciliation 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
public void setDeviceMastershipManager(DeviceMastershipManager deviceMastershipManager)
-
onPropertyChanged
public void onPropertyChanged(@NonNull String propertyName, @NonNull String propertyValue)
Description copied from interface:ConfigurationListener
Method invoked on configuration property change.- Specified by:
onPropertyChanged
in interfaceConfigurationListener
- Parameters:
propertyName
- the property namepropertyValue
- the property value
-
-