Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Add replication capability to Shard"
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
ThreePhaseCommitCohortProxy.java
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 279ecba40977e1293a9fbad090cd1a0dfddff2a4..b56dc9432f0b28067ca2daaba1cd95f936cb816e 100644
(file)
--- 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,
try {
Object response =
actorContext.executeRemoteOperation(cohort,
- new CanCommitTransaction(),
+ new CanCommitTransaction()
.toSerializable()
,
ActorContext.ASK_DURATION);
ActorContext.ASK_DURATION);
- if (response
instanceof CanCommitTransactionReply
) {
+ if (response
.getClass().equals(CanCommitTransactionReply.SERIALIZABLE_CLASS)
) {
CanCommitTransactionReply reply =
CanCommitTransactionReply reply =
-
(CanCommitTransactionReply) response
;
+
CanCommitTransactionReply.fromSerializable(response)
;
if (!reply.getCanCommit()) {
return false;
}
if (!reply.getCanCommit()) {
return false;
}
@@
-97,15
+97,15
@@
public class ThreePhaseCommitCohortProxy implements
}
@Override public ListenableFuture<Void> preCommit() {
}
@Override public ListenableFuture<Void> preCommit() {
- return voidOperation(new PreCommitTransaction()
, PreCommitTransactionReply.class
);
+ return voidOperation(new PreCommitTransaction()
.toSerializable(), PreCommitTransactionReply.SERIALIZABLE_CLASS
);
}
@Override public ListenableFuture<Void> abort() {
}
@Override public ListenableFuture<Void> abort() {
- return voidOperation(new AbortTransaction()
, AbortTransactionReply.class
);
+ return voidOperation(new AbortTransaction()
.toSerializable(), AbortTransactionReply.SERIALIZABLE_CLASS
);
}
@Override public ListenableFuture<Void> commit() {
}
@Override public ListenableFuture<Void> commit() {
- return voidOperation(new CommitTransaction()
, CommitTransactionReply.class
);
+ return voidOperation(new CommitTransaction()
.toSerializable(), CommitTransactionReply.SERIALIZABLE_CLASS
);
}
private ListenableFuture<Void> voidOperation(final Object message, final Class expectedResponseClass){
}
private ListenableFuture<Void> voidOperation(final Object message, final Class expectedResponseClass){