Search in sources :

Example 1 with DeviceMastershipManager

use of org.opendaylight.openflowplugin.applications.frsync.impl.clustering.DeviceMastershipManager in project openflowplugin by opendaylight.

the class ForwardingRulesSyncProvider method onSessionInitiated.

@Override
public void onSessionInitiated(final ProviderContext providerContext) {
    final TableForwarder tableForwarder = new TableForwarder(salTableService);
    final SyncPlanPushStrategy syncPlanPushStrategy = new SyncPlanPushStrategyFlatBatchImpl().setFlatBatchService(flatBatchService).setTableForwarder(tableForwarder);
    final ReconciliationRegistry reconciliationRegistry = new ReconciliationRegistry();
    final DeviceMastershipManager deviceMastershipManager = new DeviceMastershipManager(clusterSingletonService, reconciliationRegistry);
    final SyncReactor syncReactorImpl = new SyncReactorImpl(syncPlanPushStrategy);
    final SyncReactor syncReactorRetry = new SyncReactorRetryDecorator(syncReactorImpl, reconciliationRegistry);
    final SyncReactor syncReactorGuard = new SyncReactorGuardDecorator(syncReactorRetry);
    final SyncReactor syncReactorFutureZip = new SyncReactorFutureZipDecorator(syncReactorGuard, syncThreadPool);
    final SyncReactor reactor = new SyncReactorClusterDecorator(syncReactorFutureZip, deviceMastershipManager);
    final FlowCapableNodeSnapshotDao configSnapshot = new FlowCapableNodeSnapshotDao();
    final FlowCapableNodeSnapshotDao operationalSnapshot = new FlowCapableNodeSnapshotDao();
    final FlowCapableNodeDao configDao = new FlowCapableNodeCachedDao(configSnapshot, new FlowCapableNodeOdlDao(dataService, LogicalDatastoreType.CONFIGURATION));
    final FlowCapableNodeDao operationalDao = new FlowCapableNodeCachedDao(operationalSnapshot, new FlowCapableNodeOdlDao(dataService, LogicalDatastoreType.OPERATIONAL));
    final NodeListener<FlowCapableNode> nodeListenerConfig = new SimplifiedConfigListener(reactor, configSnapshot, operationalDao);
    final NodeListener<Node> nodeListenerOperational = new SimplifiedOperationalListener(reactor, operationalSnapshot, configDao, reconciliationRegistry, deviceMastershipManager);
    dataTreeConfigChangeListener = dataService.registerDataTreeChangeListener(nodeConfigDataTreePath, nodeListenerConfig);
    dataTreeOperationalChangeListener = dataService.registerDataTreeChangeListener(nodeOperationalDataTreePath, nodeListenerOperational);
    LOG.info("ForwardingRulesSync has started.");
}
Also used : FlowCapableNodeSnapshotDao(org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeSnapshotDao) FlowCapableNodeOdlDao(org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeOdlDao) SyncPlanPushStrategyFlatBatchImpl(org.opendaylight.openflowplugin.applications.frsync.impl.strategy.SyncPlanPushStrategyFlatBatchImpl) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) ReconciliationRegistry(org.opendaylight.openflowplugin.applications.frsync.util.ReconciliationRegistry) SyncPlanPushStrategy(org.opendaylight.openflowplugin.applications.frsync.SyncPlanPushStrategy) SyncReactor(org.opendaylight.openflowplugin.applications.frsync.SyncReactor) TableForwarder(org.opendaylight.openflowplugin.applications.frsync.impl.strategy.TableForwarder) FlowCapableNodeDao(org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeDao) FlowCapableNodeCachedDao(org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeCachedDao) DeviceMastershipManager(org.opendaylight.openflowplugin.applications.frsync.impl.clustering.DeviceMastershipManager)

Aggregations

SyncPlanPushStrategy (org.opendaylight.openflowplugin.applications.frsync.SyncPlanPushStrategy)1 SyncReactor (org.opendaylight.openflowplugin.applications.frsync.SyncReactor)1 FlowCapableNodeCachedDao (org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeCachedDao)1 FlowCapableNodeDao (org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeDao)1 FlowCapableNodeOdlDao (org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeOdlDao)1 FlowCapableNodeSnapshotDao (org.opendaylight.openflowplugin.applications.frsync.dao.FlowCapableNodeSnapshotDao)1 DeviceMastershipManager (org.opendaylight.openflowplugin.applications.frsync.impl.clustering.DeviceMastershipManager)1 SyncPlanPushStrategyFlatBatchImpl (org.opendaylight.openflowplugin.applications.frsync.impl.strategy.SyncPlanPushStrategyFlatBatchImpl)1 TableForwarder (org.opendaylight.openflowplugin.applications.frsync.impl.strategy.TableForwarder)1 ReconciliationRegistry (org.opendaylight.openflowplugin.applications.frsync.util.ReconciliationRegistry)1 FlowCapableNode (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode)1 Node (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node)1