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%2FShardTransaction.java;h=44393a14f1c1ff1daae4a14d808a36225133d689;hb=546cd1fd100dbaa36908b22c2f422320dbd8c4b2;hp=87dd5e3e2638fff856352b2f012523ad83631c82;hpb=7011afc1380ca25ad3de4cc8865f12fe3f5e09cf;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java index 87dd5e3e26..44393a14f1 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java @@ -5,19 +5,18 @@ * 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 static java.util.Objects.requireNonNull; + import akka.actor.ActorRef; import akka.actor.PoisonPill; import akka.actor.Props; import akka.actor.ReceiveTimeout; import akka.japi.Creator; -import com.google.common.base.Preconditions; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.controller.cluster.common.actor.AbstractUntypedActorWithMetering; -import org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStats; import org.opendaylight.controller.cluster.datastore.messages.CloseTransaction; import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionReply; import org.opendaylight.controller.cluster.datastore.messages.DataExists; @@ -41,12 +40,13 @@ public abstract class ShardTransaction extends AbstractUntypedActorWithMetering super("shard-tx"); this.shardActor = shardActor; this.shardStats = shardStats; - this.transactionId = Preconditions.checkNotNull(transactionId); + this.transactionId = requireNonNull(transactionId); } public static Props props(final TransactionType type, final AbstractShardDataTreeTransaction transaction, final ActorRef shardActor, final DatastoreContext datastoreContext, final ShardStats shardStats) { - return Props.create(new ShardTransactionCreator(type, transaction, shardActor, datastoreContext, shardStats)); + return Props.create(ShardTransaction.class, + new ShardTransactionCreator(type, transaction, shardActor, datastoreContext, shardStats)); } protected abstract AbstractShardDataTreeTransaction getDOMStoreTransaction(); @@ -130,7 +130,7 @@ public abstract class ShardTransaction extends AbstractUntypedActorWithMetering ShardTransactionCreator(final TransactionType type, final AbstractShardDataTreeTransaction transaction, final ActorRef shardActor, final DatastoreContext datastoreContext, final ShardStats shardStats) { - this.transaction = Preconditions.checkNotNull(transaction); + this.transaction = requireNonNull(transaction); this.shardActor = shardActor; this.shardStats = shardStats; this.datastoreContext = datastoreContext;