Introduce a shared successful RpcResult 31/20631/4
authorRobert Varga <rovarga@cisco.com>
Mon, 18 May 2015 09:09:29 +0000 (11:09 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 19 May 2015 06:49:26 +0000 (08:49 +0200)
Also fix message counters in PacketProcessing.

Change-Id: I7a270efa50a88dc430691002031d4079e3e369bf
Signed-off-by: Robert Varga <rovarga@cisco.com>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java

index 01952387614fc33eaefab18bd41a7ea6dc3fa860..aa28370282c39538daba40e9306d815ec97aeb02 100644 (file)
@@ -24,6 +24,7 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 
 public abstract class CommonService {
+    protected static final RpcResult<Void> SUCCESSFUL_RPCRESULT = RpcResultBuilder.<Void>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;
index 3f8e51fde22f7a7e6c006636ced80afe713f8fcf..9872b2252c1963281337a950ab2b37a470275e23 100644 (file)
@@ -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.<Void>success().build());
+                settableFuture.set(SUCCESSFUL_RPCRESULT);
             }
 
             @Override