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 "Bug 1239 - Clean up and refactor netconf-ssh client"
[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 d12dc2b55a17f0ebaf1a3999778b109efbd60a0f..279ecba40977e1293a9fbad090cd1a0dfddff2a4 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
@@
-30,7
+30,6
@@
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
/**
* ThreePhaseCommitCohortProxy represents a set of remote cohort proxies
/**
* ThreePhaseCommitCohortProxy represents a set of remote cohort proxies
@@
-43,13
+42,19
@@
public class ThreePhaseCommitCohortProxy implements
private final ActorContext actorContext;
private final List<ActorPath> cohortPaths;
private final ActorContext actorContext;
private final List<ActorPath> cohortPaths;
- //FIXME : Use a thread pool here
- private final
ExecutorService executorService = Executors.newSingleThreadExecutor()
;
+ private final ExecutorService executor;
+ private final
String transactionId
;
- public ThreePhaseCommitCohortProxy(ActorContext actorContext, List<ActorPath> cohortPaths) {
+ public ThreePhaseCommitCohortProxy(ActorContext actorContext,
+ List<ActorPath> cohortPaths,
+ String transactionId,
+ ExecutorService executor) {
+
this.actorContext = actorContext;
this.cohortPaths = cohortPaths;
this.actorContext = actorContext;
this.cohortPaths = cohortPaths;
+ this.transactionId = transactionId;
+ this.executor = executor;
}
@Override public ListenableFuture<Boolean> canCommit() {
}
@Override public ListenableFuture<Boolean> canCommit() {
@@
-86,7
+91,7
@@
public class ThreePhaseCommitCohortProxy implements
ListenableFutureTask<Boolean>
future = ListenableFutureTask.create(call);
ListenableFutureTask<Boolean>
future = ListenableFutureTask.create(call);
- executor
Service
.submit(future);
+ executor.submit(future);
return future;
}
return future;
}
@@
-136,7
+141,7
@@
public class ThreePhaseCommitCohortProxy implements
ListenableFutureTask<Void>
future = ListenableFutureTask.create(call);
ListenableFutureTask<Void>
future = ListenableFutureTask.create(call);
- executor
Service
.submit(future);
+ executor.submit(future);
return future;
return future;