X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2FOpendaylightMeterStatisticsServiceImpl.java;h=22f74d27672f5eea4c5bb0a9134a640085e1dc8e;hb=52f1d136aff5568e9d9607e6a61e4ec128c962aa;hp=ecee95ef785df4229edf5bcafe0ee42c70996a36;hpb=dc32b3883e31861ef2dde36735641e03c3207fb5;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightMeterStatisticsServiceImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightMeterStatisticsServiceImpl.java index ecee95ef78..22f74d2767 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightMeterStatisticsServiceImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/OpendaylightMeterStatisticsServiceImpl.java @@ -8,6 +8,8 @@ package org.opendaylight.openflowplugin.impl.statistics.services; import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicLong; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext; import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack; import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsInput; @@ -26,32 +28,38 @@ public class OpendaylightMeterStatisticsServiceImpl implements OpendaylightMeter private final AllMeterStatsService allMeterStats; private final MeterFeaturesService meterFeatures; private final MeterStatsService meterStats; + private final NotificationPublishService notificationPublishService; - public OpendaylightMeterStatisticsServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext) { - allMeterConfig = new AllMeterConfigStatsService(requestContextStack, deviceContext); - allMeterStats = new AllMeterStatsService(requestContextStack, deviceContext); - meterFeatures = new MeterFeaturesService(requestContextStack, deviceContext); - meterStats = new MeterStatsService(requestContextStack, deviceContext); + public OpendaylightMeterStatisticsServiceImpl(final RequestContextStack requestContextStack, + final DeviceContext deviceContext, + final AtomicLong compatibilityXidSeed, + final NotificationPublishService notificationPublishService) { + this.notificationPublishService = notificationPublishService; + + allMeterConfig = new AllMeterConfigStatsService(requestContextStack, deviceContext, compatibilityXidSeed); + allMeterStats = new AllMeterStatsService(requestContextStack, deviceContext, compatibilityXidSeed); + meterFeatures = new MeterFeaturesService(requestContextStack, deviceContext, compatibilityXidSeed); + meterStats = new MeterStatsService(requestContextStack, deviceContext, compatibilityXidSeed); } @Override public Future> getAllMeterConfigStatistics( final GetAllMeterConfigStatisticsInput input) { - return allMeterConfig.handleServiceCall(input); + return allMeterConfig.handleAndNotify(input, notificationPublishService); } @Override public Future> getAllMeterStatistics(final GetAllMeterStatisticsInput input) { - return allMeterStats.handleServiceCall(input); + return allMeterStats.handleAndNotify(input, notificationPublishService); } @Override public Future> getMeterFeatures(final GetMeterFeaturesInput input) { - return meterFeatures.handleServiceCall(input); + return meterFeatures.handleAndNotify(input, notificationPublishService); } @Override public Future> getMeterStatistics(final GetMeterStatisticsInput input) { - return meterStats.handleServiceCall(input); + return meterStats.handleAndNotify(input, notificationPublishService); } }