use of org.opendaylight.openflowplugin.impl.statistics.services.OpendaylightGroupStatisticsServiceImpl in project openflowplugin by opendaylight.
the class MdSalRegistrationUtils method registerStatCompatibilityServices.
/**
* Support deprecated statistic related services for backward compatibility. The only exception from deprecation is
* the aggregated flow statistic with match criteria input.
*
* @param rpcContext - registration processing is implemented in
* {@link org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext}
*
* @param deviceContext - every service needs
* {@link org.opendaylight.openflowplugin.api.openflow.device.DeviceContext} as input parameter
*
* @param notificationPublishService - notification service
*
* @param convertorExecutor - convertor executor
*/
public static void registerStatCompatibilityServices(final RpcContext rpcContext, final DeviceContext deviceContext, final NotificationPublishService notificationPublishService, final ConvertorExecutor convertorExecutor) {
AtomicLong compatibilityXidSeed = new AtomicLong();
// pickup low statistics service
final OpendaylightFlowStatisticsService flowStatisticsService = Preconditions.checkNotNull(rpcContext.lookupRpcService(OpendaylightFlowStatisticsService.class));
// attach delegate to flow statistics service (to cover all but aggregated stats with match filter input)
final OpendaylightFlowStatisticsServiceDelegateImpl flowStatisticsDelegate = new OpendaylightFlowStatisticsServiceDelegateImpl(rpcContext, deviceContext, notificationPublishService, new AtomicLong(), convertorExecutor);
((Delegator<OpendaylightFlowStatisticsService>) flowStatisticsService).setDelegate(flowStatisticsDelegate);
// register all statistics (deprecated) services
rpcContext.registerRpcServiceImplementation(OpendaylightFlowTableStatisticsService.class, new OpendaylightFlowTableStatisticsServiceImpl(rpcContext, deviceContext, compatibilityXidSeed, notificationPublishService));
rpcContext.registerRpcServiceImplementation(OpendaylightGroupStatisticsService.class, new OpendaylightGroupStatisticsServiceImpl(rpcContext, deviceContext, compatibilityXidSeed, notificationPublishService, convertorExecutor));
rpcContext.registerRpcServiceImplementation(OpendaylightMeterStatisticsService.class, new OpendaylightMeterStatisticsServiceImpl(rpcContext, deviceContext, compatibilityXidSeed, notificationPublishService, convertorExecutor));
rpcContext.registerRpcServiceImplementation(OpendaylightQueueStatisticsService.class, new OpendaylightQueueStatisticsServiceImpl(rpcContext, deviceContext, compatibilityXidSeed, notificationPublishService));
rpcContext.registerRpcServiceImplementation(OpendaylightPortStatisticsService.class, new OpendaylightPortStatisticsServiceImpl(rpcContext, deviceContext, compatibilityXidSeed, notificationPublishService));
}
Aggregations