-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
*/
package org.opendaylight.openflowplugin.impl.statistics.services;
-import java.util.concurrent.Future;
+import com.google.common.util.concurrent.ListenableFuture;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.TranslatorLibrary;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
import org.opendaylight.yangtools.yang.common.RpcResult;
-/**
- * @author joe
- */
-public class OpendaylightFlowStatisticsServiceImpl implements OpendaylightFlowStatisticsService, Delegator<OpendaylightFlowStatisticsService> {
+public class OpendaylightFlowStatisticsServiceImpl implements OpendaylightFlowStatisticsService,
+ Delegator<OpendaylightFlowStatisticsService> {
private final SingleLayerAggregateFlowMultipartService singleLayerService;
private final MultiLayerAggregateFlowMultipartService multiLayerService;
private OpendaylightFlowStatisticsService delegate;
public static OpendaylightFlowStatisticsServiceImpl createWithOook(final RequestContextStack requestContextStack,
- final DeviceContext deviceContext, final ConvertorExecutor convertorExecutor) {
- return new OpendaylightFlowStatisticsServiceImpl(requestContextStack, deviceContext, deviceContext.oook(), convertorExecutor);
+ final DeviceContext deviceContext,
+ final ConvertorExecutor convertorExecutor) {
+ return new OpendaylightFlowStatisticsServiceImpl(requestContextStack,
+ deviceContext,
+ deviceContext.oook(),
+ convertorExecutor);
}
public OpendaylightFlowStatisticsServiceImpl(final RequestContextStack requestContextStack,
final DeviceContext deviceContext,
final TranslatorLibrary translatorLibrary,
final ConvertorExecutor convertorExecutor) {
- singleLayerService = new SingleLayerAggregateFlowMultipartService(requestContextStack, deviceContext,
- convertorExecutor);
+ singleLayerService = new SingleLayerAggregateFlowMultipartService(requestContextStack, deviceContext);
multiLayerService = new MultiLayerAggregateFlowMultipartService(requestContextStack, deviceContext,
convertorExecutor, translatorLibrary);
}
}
/**
- * @deprecated provided for Be-release as backward compatibility relic
+ * Get aggregate statistics.
+ *
+ * @deprecated provided for Be-release as backward compatibility relic.
*/
@Override
@Deprecated
- public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>> getAggregateFlowStatisticsFromFlowTableForAllFlows(
- final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input) {
+ public ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForAllFlowsOutput>>
+ getAggregateFlowStatisticsFromFlowTableForAllFlows(
+ final GetAggregateFlowStatisticsFromFlowTableForAllFlowsInput input) {
if (delegate != null) {
return delegate.getAggregateFlowStatisticsFromFlowTableForAllFlows(input);
} else {
}
@Override
- public Future<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>> getAggregateFlowStatisticsFromFlowTableForGivenMatch(
- final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) {
+ public ListenableFuture<RpcResult<GetAggregateFlowStatisticsFromFlowTableForGivenMatchOutput>>
+ getAggregateFlowStatisticsFromFlowTableForGivenMatch(
+ final GetAggregateFlowStatisticsFromFlowTableForGivenMatchInput input) {
return singleLayerService.canUseSingleLayerSerialization()
? singleLayerService.handleAndReply(input)
: multiLayerService.handleAndReply(input);
}
/**
- * @deprecated provided for Be-release as backward compatibility relic
+ * Get flow statistics.
+ *
+ * @deprecated provided for Be-release as backward compatibility relic.
*/
@Override
@Deprecated
- public Future<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> getAllFlowStatisticsFromFlowTable(
+ public ListenableFuture<RpcResult<GetAllFlowStatisticsFromFlowTableOutput>> getAllFlowStatisticsFromFlowTable(
final GetAllFlowStatisticsFromFlowTableInput input) {
if (delegate != null) {
return delegate.getAllFlowStatisticsFromFlowTable(input);
}
/**
- * @deprecated provided for Be-release as backward compatibility relic
+ * Get flow statistics.
+ *
+ * @deprecated provided for Be-release as backward compatibility relic.
*/
@Override
@Deprecated
- public Future<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>> getAllFlowsStatisticsFromAllFlowTables(
- final GetAllFlowsStatisticsFromAllFlowTablesInput input) {
+ public ListenableFuture<RpcResult<GetAllFlowsStatisticsFromAllFlowTablesOutput>>
+ getAllFlowsStatisticsFromAllFlowTables(final GetAllFlowsStatisticsFromAllFlowTablesInput input) {
if (delegate != null) {
return delegate.getAllFlowsStatisticsFromAllFlowTables(input);
} else {
}
/**
- * @deprecated provided for Be-release as backward compatibility relic
+ * Get flow statistics.
+ *
+ * @deprecated provided for Be-release as backward compatibility relic.
*/
@Override
@Deprecated
- public Future<RpcResult<GetFlowStatisticsFromFlowTableOutput>> getFlowStatisticsFromFlowTable(
+ public ListenableFuture<RpcResult<GetFlowStatisticsFromFlowTableOutput>> getFlowStatisticsFromFlowTable(
final GetFlowStatisticsFromFlowTableInput input) {
if (delegate != null) {
return delegate.getFlowStatisticsFromFlowTable(input);