Deprecate CloseTransaction protobuff message
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardTransaction.java
index 3d54b4e8147c01e4f3d8f89a98421a4858c69442..c6d13dcc8180553af87e0d75364999203e4b8636 100644 (file)
@@ -80,7 +80,7 @@ public abstract class ShardTransaction extends AbstractUntypedActorWithMetering
 
     @Override
     public void handleReceive(Object message) throws Exception {
-        if (message.getClass().equals(CloseTransaction.SERIALIZABLE_CLASS)) {
+        if (CloseTransaction.isSerializedType(message)) {
             closeTransaction(true);
         } else if (message instanceof ReceiveTimeout) {
             if(LOG.isDebugEnabled()) {
@@ -100,7 +100,7 @@ public abstract class ShardTransaction extends AbstractUntypedActorWithMetering
         getDOMStoreTransaction().abort();
 
         if(sendReply && returnCloseTransactionReply()) {
-            getSender().tell(CloseTransactionReply.INSTANCE.toSerializable(), getSelf());
+            getSender().tell(new CloseTransactionReply(), getSelf());
         }
 
         getSelf().tell(PoisonPill.getInstance(), getSelf());