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%2FCreateShard.java;h=8c5cbad33088c3beceb929fa5851fe29a882dee8;hb=b5d01b5d28d52413bf45b626b746c1519685058c;hp=6b4fd7c204a194d1c2edf7f80ede8557e16a6eb7;hpb=e970feb618c5e3793454f7f1a3974797a61c7c17;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateShard.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateShard.java index 6b4fd7c204..8c5cbad330 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateShard.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateShard.java @@ -7,11 +7,13 @@ */ package org.opendaylight.controller.cluster.datastore.messages; -import com.google.common.base.Preconditions; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import static java.util.Objects.requireNonNull; + +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.controller.cluster.datastore.DatastoreContext; import org.opendaylight.controller.cluster.datastore.Shard; +import org.opendaylight.controller.cluster.datastore.Shard.AbstractBuilder; import org.opendaylight.controller.cluster.datastore.config.ModuleShardConfiguration; /** @@ -28,28 +30,25 @@ public class CreateShard { * Constructor. * * @param moduleShardConfig the configuration of the new shard. - * @param shardPropsCreator used to obtain the Props for creating the shard actor instance. + * @param shardBuilder used to obtain the Props for creating the shard actor instance. * @param datastoreContext the DatastoreContext for the new shard. If null, the default is used. */ - public CreateShard(@Nonnull ModuleShardConfiguration moduleShardConfig, - @Nonnull Shard.AbstractBuilder shardBuilder, @Nullable DatastoreContext datastoreContext) { - this.moduleShardConfig = Preconditions.checkNotNull(moduleShardConfig); - this.shardBuilder = Preconditions.checkNotNull(shardBuilder); + public CreateShard(@NonNull ModuleShardConfiguration moduleShardConfig, @NonNull AbstractBuilder shardBuilder, + @Nullable DatastoreContext datastoreContext) { + this.moduleShardConfig = requireNonNull(moduleShardConfig); + this.shardBuilder = requireNonNull(shardBuilder); this.datastoreContext = datastoreContext; } - @Nonnull - public ModuleShardConfiguration getModuleShardConfig() { + public @NonNull ModuleShardConfiguration getModuleShardConfig() { return moduleShardConfig; } - @Nonnull - public Shard.AbstractBuilder getShardBuilder() { + public @NonNull AbstractBuilder getShardBuilder() { return shardBuilder; } - @Nullable - public DatastoreContext getDatastoreContext() { + public @Nullable DatastoreContext getDatastoreContext() { return datastoreContext; }