2 * Copyright (c) 2024 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowplugin.impl.statistics.services;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.util.concurrent.ListenableFuture;
13 import java.util.concurrent.atomic.AtomicLong;
14 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
15 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
16 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
17 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatistics;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsInput;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.GetAllMeterConfigStatisticsOutput;
21 import org.opendaylight.yangtools.yang.common.RpcResult;
24 public final class GetAllMeterConfigStatisticsImpl implements GetAllMeterConfigStatistics {
25 private final NotificationPublishService notificationPublishService;
26 private final AllMeterConfigStatsService allMeterConfig;
28 public GetAllMeterConfigStatisticsImpl(final RequestContextStack requestContextStack,
29 final DeviceContext deviceContext, final AtomicLong compatibilityXidSeed,
30 final NotificationPublishService notificationPublishService, final ConvertorExecutor convertorExecutor) {
31 allMeterConfig = new AllMeterConfigStatsService(requestContextStack, deviceContext, compatibilityXidSeed,
33 this.notificationPublishService = requireNonNull(notificationPublishService);
37 public ListenableFuture<RpcResult<GetAllMeterConfigStatisticsOutput>> invoke(
38 final GetAllMeterConfigStatisticsInput input) {
39 return allMeterConfig.handleAndNotify(input, notificationPublishService);