tech.ydb.jdbc.settings.YdbClientProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-jdbc-driver Show documentation
Show all versions of ydb-jdbc-driver Show documentation
JDBC Driver over YDB Java SDK
package tech.ydb.jdbc.settings;
import java.time.Duration;
import java.util.Collection;
import java.util.function.BiConsumer;
import javax.annotation.Nullable;
import tech.ydb.table.TableClient;
public class YdbClientProperty extends AbstractYdbProperty {
private static final PropertiesCollector> PROPERTIES = new PropertiesCollector<>();
public static final YdbClientProperty KEEP_QUERY_TEXT =
new YdbClientProperty<>(
"keepQueryText",
"Keep Query text",
null,
Boolean.class,
PropertyConverter.booleanValue(),
TableClient.Builder::keepQueryText);
public static final YdbClientProperty SESSION_KEEP_ALIVE_TIME =
new YdbClientProperty<>(
"sessionKeepAliveTime",
"Session keep-alive timeout",
null,
Duration.class,
PropertyConverter.durationValue(),
TableClient.Builder::sessionKeepAliveTime);
public static final YdbClientProperty SESSION_MAX_IDLE_TIME =
new YdbClientProperty<>(
"sessionMaxIdleTime",
"Session max idle time",
null,
Duration.class,
PropertyConverter.durationValue(),
TableClient.Builder::sessionMaxIdleTime);
public static final YdbClientProperty SESSION_POOL_SIZE_MIN =
new YdbClientProperty<>("sessionPoolSizeMin",
"Session pool min size (with with sessionPoolSizeMax)",
null,
Integer.class,
PropertyConverter.integerValue(),
(builder, value) -> {
});
public static final YdbClientProperty SESSION_POOL_SIZE_MAX =
new YdbClientProperty<>(
"sessionPoolSizeMax",
"Session pool max size (with with sessionPoolSizeMin)",
null,
Integer.class,
PropertyConverter.integerValue(),
(builder, value) -> {
});
protected YdbClientProperty(String name,
String description,
@Nullable String defaultValue,
Class type,
PropertyConverter converter,
BiConsumer setter) {
super(name, description, defaultValue, type, converter, setter);
PROPERTIES.register(this);
}
public static Collection> properties() {
return PROPERTIES.properties();
}
}