X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmessages%2FLocalPrimaryShardFound.java;h=e4b9174f1eb9354cd6f39c61a3eec697b8b82dfe;hp=0ca4f6444da1861f382ba5dfa626fbe72f2674e1;hb=f662ce8b1fa94b77ba66f7ece8bcaff91dee809e;hpb=8232a626b43fdd2f5799da0fbcfb0f02d3c8f4fb 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..e4b9174f1e 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.api.schema.tree.ReadOnlyDataTree; /** * Local message sent in reply to FindPrimaryShard to indicate the primary shard is local to the caller. @@ -20,20 +21,18 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; 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(@NonNull String primaryPath, @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; }