*/
package org.opendaylight.controller.cluster.datastore;
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
+
import akka.util.Timeout;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
}
private void setSnapshotDataThresholdPercentage(final int shardSnapshotDataThresholdPercentage) {
- Preconditions.checkArgument(shardSnapshotDataThresholdPercentage >= 0
- && shardSnapshotDataThresholdPercentage <= 100);
+ checkArgument(shardSnapshotDataThresholdPercentage >= 0 && shardSnapshotDataThresholdPercentage <= 100);
raftConfig.setSnapshotDataThresholdPercentage(shardSnapshotDataThresholdPercentage);
}
}
public Builder logicalStoreType(final LogicalDatastoreType logicalStoreType) {
- datastoreContext.logicalStoreType = Preconditions.checkNotNull(logicalStoreType);
+ datastoreContext.logicalStoreType = requireNonNull(logicalStoreType);
// Retain compatible naming
switch (logicalStoreType) {
}
public Builder dataStoreName(final String dataStoreName) {
- datastoreContext.dataStoreName = Preconditions.checkNotNull(dataStoreName);
+ datastoreContext.dataStoreName = requireNonNull(dataStoreName);
datastoreContext.dataStoreMXBeanType = "Distributed" + WordUtils.capitalize(dataStoreName) + "Datastore";
return this;
}