com.yandex.ydb.table.settings.PartitioningPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
JDBC client implementation over Table client, single jar
The newest version!
package com.yandex.ydb.table.settings;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.yandex.ydb.table.values.TupleValue;
/**
* @author Sergey Polovko
*/
public class PartitioningPolicy {
@Nullable
private String presetName;
@Nullable
private AutoPartitioningPolicy autoPartitioning;
private long uniformPartitions;
@Nullable
private List explicitPartitioningPoints;
@Nullable
public String getPresetName() {
return presetName;
}
public PartitioningPolicy setPresetName(@Nonnull String presetName) {
this.presetName = presetName;
return this;
}
@Nullable
public AutoPartitioningPolicy getAutoPartitioning() {
return autoPartitioning;
}
public PartitioningPolicy setAutoPartitioning(@Nonnull AutoPartitioningPolicy autoPartitioning) {
this.autoPartitioning = autoPartitioning;
return this;
}
public long getUniformPartitions() {
return uniformPartitions;
}
public PartitioningPolicy setUniformPartitions(long uniformPartitions) {
this.uniformPartitions = uniformPartitions;
return this;
}
public PartitioningPolicy setExplicitPartitioningPoints(@Nullable List explicitPartitioningPoints) {
this.explicitPartitioningPoints = explicitPartitioningPoints;
return this;
}
public PartitioningPolicy addExplicitPartitioningPoint(TupleValue value) {
if (this.explicitPartitioningPoints == null) {
this.explicitPartitioningPoints = new ArrayList<>(2);
}
this.explicitPartitioningPoints.add(value);
return this;
}
@Nullable
public List getExplicitPartitioningPoints() {
return explicitPartitioningPoints;
}
}