X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fstatistics%2Fservices%2Fcompatibility%2FOpendaylightFlowStatisticsServiceDelegateImpl.java;h=ff9bbee23c57cf5bc0479554c71c69fff1faf8e8;hb=cfe3a97837951ebbedb337dc988027f10c49f714;hp=199afcaccbf4f04ef4a2c6a817ddafbc43b1b9de;hpb=1f2f4d39bcd7b0fc141a593d0e03cc62cc0abfc8;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImpl.java index 199afcaccb..ff9bbee23c 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/compatibility/OpendaylightFlowStatisticsServiceDelegateImpl.java @@ -7,15 +7,16 @@ */ package org.opendaylight.openflowplugin.impl.statistics.services.compatibility; -import java.util.concurrent.Future; +import com.google.common.util.concurrent.ListenableFuture; import java.util.concurrent.atomic.AtomicLong; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.mdsal.binding.api.NotificationPublishService; import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext; import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack; import org.opendaylight.openflowplugin.impl.statistics.services.AggregateFlowsInTableService; import org.opendaylight.openflowplugin.impl.statistics.services.AllFlowsInAllTablesService; import org.opendaylight.openflowplugin.impl.statistics.services.AllFlowsInTableService; import org.opendaylight.openflowplugin.impl.statistics.services.FlowsInTableService; +import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput; @@ -31,9 +32,6 @@ import org.opendaylight.yangtools.yang.common.RpcResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - * @author joe - */ public class OpendaylightFlowStatisticsServiceDelegateImpl implements OpendaylightFlowStatisticsService { private static final Logger LOG = LoggerFactory.getLogger(OpendaylightFlowStatisticsServiceDelegateImpl.class); @@ -47,45 +45,56 @@ public class OpendaylightFlowStatisticsServiceDelegateImpl implements Opendaylig public OpendaylightFlowStatisticsServiceDelegateImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext, final NotificationPublishService notificationService, - final AtomicLong compatibilityXidSeed) { + final AtomicLong compatibilityXidSeed, + final ConvertorExecutor convertorExecutor) { this.notificationService = notificationService; - aggregateFlowsInTable = AggregateFlowsInTableService.createWithOook(requestContextStack, deviceContext, compatibilityXidSeed); - allFlowsInAllTables = new AllFlowsInAllTablesService(requestContextStack, deviceContext, compatibilityXidSeed); - allFlowsInTable = new AllFlowsInTableService(requestContextStack, deviceContext, compatibilityXidSeed); - flowsInTable = new FlowsInTableService(requestContextStack, deviceContext, compatibilityXidSeed); + aggregateFlowsInTable = + AggregateFlowsInTableService.createWithOook(requestContextStack, deviceContext, compatibilityXidSeed); + allFlowsInAllTables = new AllFlowsInAllTablesService(requestContextStack, + deviceContext, + compatibilityXidSeed, + convertorExecutor); + allFlowsInTable = + new AllFlowsInTableService(requestContextStack, deviceContext, compatibilityXidSeed, convertorExecutor); + flowsInTable = + new FlowsInTableService(requestContextStack, deviceContext, compatibilityXidSeed, convertorExecutor); } /** - * @deprecated this is the only method with real implementation provided, in delegate it makes no sense + * Get statistics for the given match. + * + * @deprecated this is the only method with real implementation provided, in delegate it makes no sense. */ @Override @Deprecated - public Future> getAggregateFlowStatisticsFromFlowTableForGivenMatch( + public ListenableFuture> + getAggregateFlowStatisticsFromFlowTableForGivenMatch( final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) { - throw new IllegalAccessError("unsupported by backward compatibility delegate service " + - "- this rpc is always provided by default service implementation"); + throw new IllegalAccessError("unsupported by backward compatibility delegate service " + + "- this rpc is always provided by default service implementation"); } @Override - public Future> getAggregateFlowStatisticsFromFlowTableForAllFlows( + public ListenableFuture> + getAggregateFlowStatisticsFromFlowTableForAllFlows( final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input) { return aggregateFlowsInTable.handleAndNotify(input, notificationService); } @Override - public Future> getAllFlowStatisticsFromFlowTable( + public ListenableFuture> getAllFlowStatisticsFromFlowTable( final GetAllFlowStatisticsFromFlowTableInput input) { return allFlowsInTable.handleAndNotify(input, notificationService); } @Override - public Future> getAllFlowsStatisticsFromAllFlowTables( - final GetAllFlowsStatisticsFromAllFlowTablesInput input) { + public ListenableFuture> + getAllFlowsStatisticsFromAllFlowTables(final GetAllFlowsStatisticsFromAllFlowTablesInput input) { return allFlowsInAllTables.handleAndNotify(input, notificationService); } @Override - public Future> getFlowStatisticsFromFlowTable( + public ListenableFuture> getFlowStatisticsFromFlowTable( final GetFlowStatisticsFromFlowTableInput input) { return flowsInTable.handleAndNotify(input, notificationService); }