Do not enque purges for ask based protocol
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DataTreeCohortActorRegistry.java
index 572abeec7d1bdcf450421a7c4137fc82b60d09f5..2859671ac6bd886f0212c0b8153e193b18ff831e 100644 (file)
@@ -20,7 +20,7 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.annotation.concurrent.NotThreadSafe;
+import java.util.concurrent.Executor;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeCandidate;
@@ -39,10 +39,9 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Registry of user commit cohorts, which is responsible for handling registration and calculation
- * of affected cohorts based on {@link DataTreeCandidate}.
+ * of affected cohorts based on {@link DataTreeCandidate}. This class is NOT thread-safe.
  *
  */
-@NotThreadSafe
 class DataTreeCohortActorRegistry extends AbstractRegistrationTree<ActorRef> {
 
     private static final Logger LOG = LoggerFactory.getLogger(DataTreeCohortActorRegistry.class);
@@ -219,7 +218,7 @@ class DataTreeCohortActorRegistry extends AbstractRegistrationTree<ActorRef> {
     }
 
     CompositeDataTreeCohort createCohort(final SchemaContext schemaContext, final TransactionIdentifier txId,
-            final Timeout commitStepTimeout) {
-        return new CompositeDataTreeCohort(this, txId, schemaContext, commitStepTimeout);
+            final Executor callbackExecutor, final Timeout commitStepTimeout) {
+        return new CompositeDataTreeCohort(this, txId, schemaContext, callbackExecutor, commitStepTimeout);
     }
 }