X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDataTreeCohortActor.java;h=c8372e409e1ab6e3de0254d73fcbc0e343e2c771;hb=3f2f311927a45635339201f400652c145318e632;hp=e8db09a7cab570587615d1b1850ce84b6bbb98a0;hpb=30bf4ce61e67ca32a2132a1eaed213a02f247ac4;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java index e8db09a7ca..c8372e409e 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorRef; @@ -20,8 +19,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.concurrent.Executor; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor; import org.opendaylight.mdsal.common.api.PostCanCommitStep; @@ -194,7 +193,7 @@ final class DataTreeCohortActor extends AbstractUntypedActor { TransactionIdentifier txId = message.getTxId(); ListenableFuture future = process(handledMessageType.cast(message)); Executor callbackExecutor = future.isDone() ? MoreExecutors.directExecutor() - : runnable -> executeInSelf(runnable); + : DataTreeCohortActor.this::executeInSelf; Futures.addCallback(future, new FutureCallback() { @Override public void onSuccess(S nextStep) { @@ -235,11 +234,9 @@ final class DataTreeCohortActor extends AbstractUntypedActor { }, MoreExecutors.directExecutor()); } - @Nullable - abstract CohortBehaviour nextBehaviour(TransactionIdentifier txId, S nextStep); + abstract @Nullable CohortBehaviour nextBehaviour(TransactionIdentifier txId, S nextStep); - @Nonnull - abstract ListenableFuture process(M command); + abstract @NonNull ListenableFuture process(M command); abstract ListenableFuture abort(); @@ -256,7 +253,7 @@ final class DataTreeCohortActor extends AbstractUntypedActor { @Override ListenableFuture process(CanCommit message) { - return cohort.canCommit(message.getTxId(), message.getCandidates(), message.getSchema()); + return cohort.canCommit(message.getTxId(), message.getSchema(), message.getCandidates()); } @Override