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%2Fmessages%2FLocalPrimaryShardFound.java;h=fc0df4a951bcba4bb80c266c1cf8b3946abbe621;hb=99f80f27bee37bb23e345420bf14bb7bb4793c28;hp=0ca4f6444da1861f382ba5dfa626fbe72f2674e1;hpb=8232a626b43fdd2f5799da0fbcfb0f02d3c8f4fb;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java index 0ca4f6444d..fc0df4a951 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/LocalPrimaryShardFound.java @@ -7,10 +7,11 @@ */ package org.opendaylight.controller.cluster.datastore.messages; -import com.google.common.base.Preconditions; -import javax.annotation.Nonnull; +import static java.util.Objects.requireNonNull; + import org.apache.commons.lang3.ObjectUtils; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.yangtools.yang.data.tree.api.ReadOnlyDataTree; /** * Local message sent in reply to FindPrimaryShard to indicate the primary shard is local to the caller. @@ -18,22 +19,20 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; * @author Thomas Pantelis */ public class LocalPrimaryShardFound { - private final String primaryPath; - private final DataTree localShardDataTree; + private final ReadOnlyDataTree localShardDataTree; - public LocalPrimaryShardFound(@Nonnull String primaryPath, @Nonnull DataTree localShardDataTree) { - this.primaryPath = Preconditions.checkNotNull(primaryPath); - this.localShardDataTree = Preconditions.checkNotNull(localShardDataTree); + public LocalPrimaryShardFound(final @NonNull String primaryPath, + final @NonNull ReadOnlyDataTree localShardDataTree) { + this.primaryPath = requireNonNull(primaryPath); + this.localShardDataTree = requireNonNull(localShardDataTree); } - @Nonnull - public String getPrimaryPath() { + public @NonNull String getPrimaryPath() { return primaryPath; } - @Nonnull - public DataTree getLocalShardDataTree() { + public @NonNull ReadOnlyDataTree getLocalShardDataTree() { return localShardDataTree; }