use of org.opendaylight.openflowplugin.impl.statistics.StatisticsManagerImpl in project openflowplugin by opendaylight.
the class OpenFlowPluginProviderImpl method initialize.
@Override
public void initialize() {
registerMXBean(MESSAGE_INTELLIGENCE_AGENCY, MESSAGE_INTELLIGENCE_AGENCY_MX_BEAN_NAME);
// TODO: copied from OpenFlowPluginProvider (Helium) misusesing the old way of distributing extension converters
// TODO: rewrite later!
OFSessionUtil.getSessionManager().setExtensionConverterProvider(extensionConverterManager);
// Creates a thread pool that creates new threads as needed, but will reuse previously
// constructed threads when they are available.
// Threads that have not been used for x seconds are terminated and removed from the cache.
executorService = MoreExecutors.listeningDecorator(new ThreadPoolLoggingExecutor(config.getThreadPoolMinThreads(), config.getThreadPoolMaxThreads().getValue(), config.getThreadPoolTimeout(), TimeUnit.SECONDS, new SynchronousQueue<>(), POOL_NAME));
deviceManager = new DeviceManagerImpl(config, dataBroker, getMessageIntelligenceAgency(), notificationPublishService, hashedWheelTimer, convertorManager, deviceInitializerProvider);
TranslatorLibraryUtil.injectBasicTranslatorLibrary(deviceManager, convertorManager);
((ExtensionConverterProviderKeeper) deviceManager).setExtensionConverterProvider(extensionConverterManager);
rpcManager = new RpcManagerImpl(config, rpcProviderRegistry, extensionConverterManager, convertorManager, notificationPublishService);
statisticsManager = new StatisticsManagerImpl(config, rpcProviderRegistry, convertorManager, executorService);
roleManager = new RoleManagerImpl(hashedWheelTimer, config);
contextChainHolder = new ContextChainHolderImpl(executorService, singletonServicesProvider, entityOwnershipService, mastershipChangeServiceManager);
contextChainHolder.addManager(deviceManager);
contextChainHolder.addManager(statisticsManager);
contextChainHolder.addManager(rpcManager);
contextChainHolder.addManager(roleManager);
connectionManager = new ConnectionManagerImpl(config, executorService);
connectionManager.setDeviceConnectedHandler(contextChainHolder);
connectionManager.setDeviceDisconnectedHandler(contextChainHolder);
deviceManager.setContextChainHolder(contextChainHolder);
deviceManager.initialize();
}
Aggregations