X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FThreePhaseCommitCohortProxy.java;h=b56dc9432f0b28067ca2daaba1cd95f936cb816e;hp=279ecba40977e1293a9fbad090cd1a0dfddff2a4;hb=ed693440aa741fee9b94447f8404d89b4020f616;hpb=cbe83ca3074fa0182d4f079f528bb710a997ced7 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java index 279ecba409..b56dc9432f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java @@ -67,12 +67,12 @@ public class ThreePhaseCommitCohortProxy implements try { Object response = actorContext.executeRemoteOperation(cohort, - new CanCommitTransaction(), + new CanCommitTransaction().toSerializable(), ActorContext.ASK_DURATION); - if (response instanceof CanCommitTransactionReply) { + if (response.getClass().equals(CanCommitTransactionReply.SERIALIZABLE_CLASS)) { CanCommitTransactionReply reply = - (CanCommitTransactionReply) response; + CanCommitTransactionReply.fromSerializable(response); if (!reply.getCanCommit()) { return false; } @@ -97,15 +97,15 @@ public class ThreePhaseCommitCohortProxy implements } @Override public ListenableFuture preCommit() { - return voidOperation(new PreCommitTransaction(), PreCommitTransactionReply.class); + return voidOperation(new PreCommitTransaction().toSerializable(), PreCommitTransactionReply.SERIALIZABLE_CLASS); } @Override public ListenableFuture abort() { - return voidOperation(new AbortTransaction(), AbortTransactionReply.class); + return voidOperation(new AbortTransaction().toSerializable(), AbortTransactionReply.SERIALIZABLE_CLASS); } @Override public ListenableFuture commit() { - return voidOperation(new CommitTransaction(), CommitTransactionReply.class); + return voidOperation(new CommitTransaction().toSerializable(), CommitTransactionReply.SERIALIZABLE_CLASS); } private ListenableFuture voidOperation(final Object message, final Class expectedResponseClass){