From: Robert Varga Date: Mon, 18 May 2015 09:09:29 +0000 (+0200) Subject: Introduce a shared successful RpcResult X-Git-Tag: release/lithium~140 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=2abee725ffc9ee2ade4baaf0f5295b0ec0602fbe;p=openflowplugin.git Introduce a shared successful RpcResult Also fix message counters in PacketProcessing. Change-Id: I7a270efa50a88dc430691002031d4079e3e369bf Signed-off-by: Robert Varga --- diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java index 0195238761..aa28370282 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java @@ -24,6 +24,7 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.slf4j.Logger; public abstract class CommonService { + protected static final RpcResult SUCCESSFUL_RPCRESULT = RpcResultBuilder.success().build(); private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(CommonService.class); private static final long WAIT_TIME = 2000; private static final BigInteger PRIMARY_CONNECTION = BigInteger.ZERO; diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java index 3f8e51fde2..9872b2252c 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java @@ -238,7 +238,7 @@ public class SalFlowServiceImpl extends CommonService implements SalFlowService RequestContextUtil.closeRequstContext(requestContext); getMessageSpy().spyMessage(FlowModInput.class, MessageSpy.STATISTIC_GROUP.TO_SWITCH_SUBMIT_SUCCESS); - settableFuture.set(RpcResultBuilder.success().build()); + settableFuture.set(SUCCESSFUL_RPCRESULT); } @Override