Package com.linkedin.venice.fastclient
Class ClientConfig.ClientConfigBuilder<K,V,T extends org.apache.avro.specific.SpecificRecord>
java.lang.Object
com.linkedin.venice.fastclient.ClientConfig.ClientConfigBuilder<K,V,T>
- Enclosing class:
- ClientConfig<K,
V, T extends org.apache.avro.specific.SpecificRecord>
public static class ClientConfig.ClientConfigBuilder<K,V,T extends org.apache.avro.specific.SpecificRecord>
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClientConfig<K,V, T> build()clone()setClientRoutingStrategyType(ClientRoutingStrategyType clientRoutingStrategyType) setClusterDiscoveryD2Service(String clusterDiscoveryD2Service) setD2Client(com.linkedin.d2.balancer.D2Client d2Client) setDaVinciClientForMetaStore(DaVinciClient<StoreMetaKey, StoreMetaValue> daVinciClientForMetaStore) setDeserializationExecutor(Executor deserializationExecutor) setDualReadEnabled(boolean dualReadEnabled) setEnableLeastLoadedRoutingStrategyForHelixGroupRouting(boolean enableLeastLoadedRoutingStrategyForHelixGroupRouting) setGenericThinClient(AvroGenericStoreClient<K, V> genericThinClient) setGrpcClientConfig(GrpcClientConfig grpcClientConfig) setHARClusters(Set<String> clusters) setInstanceHealthMonitor(InstanceHealthMonitor instanceHealthMonitor) setIsMetadataConnWarmupEnabled(boolean isMetadataConnWarmupEnabled) setKeySerializerFactory(SerializerFactory<K> keySerializerFactory) Set a custom key serializer factory.setLongTailRangeBasedRetryThresholdForBatchGetInMilliSeconds(String longTailRangeBasedRetryThresholdForBatchGetInMilliSeconds) setLongTailRangeBasedRetryThresholdForComputeInMilliSeconds(String longTailRangeBasedRetryThresholdForComputeInMilliSeconds) setLongTailRetryBudgetEnforcementWindowInMs(long longTailRetryBudgetEnforcementWindowInMs) setLongTailRetryEnabledForBatchGet(boolean longTailRetryEnabledForBatchGet) setLongTailRetryEnabledForCompute(boolean longTailRetryEnabledForCompute) setLongTailRetryEnabledForSingleGet(boolean longTailRetryEnabledForSingleGet) setLongTailRetryThresholdForBatchGetInMicroSeconds(int longTailRetryThresholdForBatchGetInMicroSeconds) setLongTailRetryThresholdForSingleGetInMicroSeconds(int longTailRetryThresholdForSingleGetInMicroSeconds) setMetadataConnWarmupTimeoutInSeconds(long metadataConnWarmupTimeoutInSeconds) setMetadataRefreshExecutor(ScheduledExecutorService metadataRefreshExecutor) setMetadataRefreshIntervalInSeconds(long metadataRefreshIntervalInSeconds) setMetricsRepository(io.tehuti.metrics.MetricsRepository metricsRepository) setProjectionFieldValidationEnabled(boolean projectionFieldValidation) setR2Client(com.linkedin.r2.transport.common.Client r2Client) setRetryBudgetEnabled(boolean retryBudgetEnabled) setRetryBudgetPercentage(double retryBudgetPercentage) setSpecificThinClient(AvroSpecificStoreClient<K, T> specificThinClient) setSpecificValueClass(Class<T> specificValueClass) setStatsPrefix(String statsPrefix) setStoreLoadControllerAcceptMultiplier(double storeLoadControllerAcceptMultiplier) setStoreLoadControllerEnabled(boolean storeLoadControllerEnabled) setStoreLoadControllerMaxRejectionRatio(double storeLoadControllerMaxRejectionRatio) setStoreLoadControllerRejectionRatioUpdateIntervalInSec(int storeLoadControllerRejectionRatioUpdateIntervalInSec) setStoreLoadControllerWindowSizeInSec(int storeLoadControllerWindowSizeInSec) setStoreMetadataFetchMode(StoreMetadataFetchMode storeMetadataFetchMode) setStoreName(String storeName) setThinClientForMetaStore(AvroSpecificStoreClient<StoreMetaKey, StoreMetaValue> thinClientForMetaStore) setUseGrpc(boolean useGrpc) setValueDeserializerFactory(DeserializerFactory<V> valueDeserializerFactory) Set a custom value deserializer factory.setVsonStore(boolean vsonStore) Deprecated.
-
Constructor Details
-
ClientConfigBuilder
public ClientConfigBuilder()
-
-
Method Details
-
setStoreName
-
setMetricsRepository
public ClientConfig.ClientConfigBuilder<K,V, setMetricsRepositoryT> (io.tehuti.metrics.MetricsRepository metricsRepository) -
setStatsPrefix
-
setSpecificValueClass
-
setDeserializationExecutor
public ClientConfig.ClientConfigBuilder<K,V, setDeserializationExecutorT> (Executor deserializationExecutor) -
setMetadataRefreshExecutor
public ClientConfig.ClientConfigBuilder<K,V, setMetadataRefreshExecutorT> (ScheduledExecutorService metadataRefreshExecutor) -
setClientRoutingStrategyType
public ClientConfig.ClientConfigBuilder<K,V, setClientRoutingStrategyTypeT> (ClientRoutingStrategyType clientRoutingStrategyType) -
setR2Client
public ClientConfig.ClientConfigBuilder<K,V, setR2ClientT> (com.linkedin.r2.transport.common.Client r2Client) -
setDualReadEnabled
-
setGenericThinClient
public ClientConfig.ClientConfigBuilder<K,V, setGenericThinClientT> (AvroGenericStoreClient<K, V> genericThinClient) -
setSpecificThinClient
public ClientConfig.ClientConfigBuilder<K,V, setSpecificThinClientT> (AvroSpecificStoreClient<K, T> specificThinClient) -
setDaVinciClientForMetaStore
public ClientConfig.ClientConfigBuilder<K,V, setDaVinciClientForMetaStoreT> (DaVinciClient<StoreMetaKey, StoreMetaValue> daVinciClientForMetaStore) -
setThinClientForMetaStore
public ClientConfig.ClientConfigBuilder<K,V, setThinClientForMetaStoreT> (AvroSpecificStoreClient<StoreMetaKey, StoreMetaValue> thinClientForMetaStore) -
setIsMetadataConnWarmupEnabled
public ClientConfig.ClientConfigBuilder<K,V, setIsMetadataConnWarmupEnabledT> (boolean isMetadataConnWarmupEnabled) -
setMetadataRefreshIntervalInSeconds
public ClientConfig.ClientConfigBuilder<K,V, setMetadataRefreshIntervalInSecondsT> (long metadataRefreshIntervalInSeconds) -
setMetadataConnWarmupTimeoutInSeconds
public ClientConfig.ClientConfigBuilder<K,V, setMetadataConnWarmupTimeoutInSecondsT> (long metadataConnWarmupTimeoutInSeconds) -
setLongTailRetryEnabledForSingleGet
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRetryEnabledForSingleGetT> (boolean longTailRetryEnabledForSingleGet) -
setLongTailRetryThresholdForSingleGetInMicroSeconds
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRetryThresholdForSingleGetInMicroSecondsT> (int longTailRetryThresholdForSingleGetInMicroSeconds) -
setLongTailRetryEnabledForBatchGet
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRetryEnabledForBatchGetT> (boolean longTailRetryEnabledForBatchGet) -
setLongTailRetryThresholdForBatchGetInMicroSeconds
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRetryThresholdForBatchGetInMicroSecondsT> (int longTailRetryThresholdForBatchGetInMicroSeconds) -
setLongTailRetryEnabledForCompute
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRetryEnabledForComputeT> (boolean longTailRetryEnabledForCompute) -
setVsonStore
Deprecated. -
setStoreMetadataFetchMode
public ClientConfig.ClientConfigBuilder<K,V, setStoreMetadataFetchModeT> (StoreMetadataFetchMode storeMetadataFetchMode) -
setD2Client
public ClientConfig.ClientConfigBuilder<K,V, setD2ClientT> (com.linkedin.d2.balancer.D2Client d2Client) -
setClusterDiscoveryD2Service
public ClientConfig.ClientConfigBuilder<K,V, setClusterDiscoveryD2ServiceT> (String clusterDiscoveryD2Service) -
setUseGrpc
-
setGrpcClientConfig
public ClientConfig.ClientConfigBuilder<K,V, setGrpcClientConfigT> (GrpcClientConfig grpcClientConfig) -
setProjectionFieldValidationEnabled
public ClientConfig.ClientConfigBuilder<K,V, setProjectionFieldValidationEnabledT> (boolean projectionFieldValidation) -
setLongTailRetryBudgetEnforcementWindowInMs
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRetryBudgetEnforcementWindowInMsT> (long longTailRetryBudgetEnforcementWindowInMs) -
setHARClusters
-
setInstanceHealthMonitor
public ClientConfig.ClientConfigBuilder<K,V, setInstanceHealthMonitorT> (InstanceHealthMonitor instanceHealthMonitor) -
setRetryBudgetEnabled
-
setRetryBudgetPercentage
public ClientConfig.ClientConfigBuilder<K,V, setRetryBudgetPercentageT> (double retryBudgetPercentage) -
setEnableLeastLoadedRoutingStrategyForHelixGroupRouting
public ClientConfig.ClientConfigBuilder<K,V, setEnableLeastLoadedRoutingStrategyForHelixGroupRoutingT> (boolean enableLeastLoadedRoutingStrategyForHelixGroupRouting) -
setStoreLoadControllerEnabled
public ClientConfig.ClientConfigBuilder<K,V, setStoreLoadControllerEnabledT> (boolean storeLoadControllerEnabled) -
setStoreLoadControllerWindowSizeInSec
public ClientConfig.ClientConfigBuilder<K,V, setStoreLoadControllerWindowSizeInSecT> (int storeLoadControllerWindowSizeInSec) -
setStoreLoadControllerRejectionRatioUpdateIntervalInSec
public ClientConfig.ClientConfigBuilder<K,V, setStoreLoadControllerRejectionRatioUpdateIntervalInSecT> (int storeLoadControllerRejectionRatioUpdateIntervalInSec) -
setStoreLoadControllerMaxRejectionRatio
public ClientConfig.ClientConfigBuilder<K,V, setStoreLoadControllerMaxRejectionRatioT> (double storeLoadControllerMaxRejectionRatio) -
setStoreLoadControllerAcceptMultiplier
public ClientConfig.ClientConfigBuilder<K,V, setStoreLoadControllerAcceptMultiplierT> (double storeLoadControllerAcceptMultiplier) -
setLongTailRangeBasedRetryThresholdForBatchGetInMilliSeconds
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRangeBasedRetryThresholdForBatchGetInMilliSecondsT> (String longTailRangeBasedRetryThresholdForBatchGetInMilliSeconds) -
setLongTailRangeBasedRetryThresholdForComputeInMilliSeconds
public ClientConfig.ClientConfigBuilder<K,V, setLongTailRangeBasedRetryThresholdForComputeInMilliSecondsT> (String longTailRangeBasedRetryThresholdForComputeInMilliSeconds) -
setKeySerializerFactory
public ClientConfig.ClientConfigBuilder<K,V, setKeySerializerFactoryT> (SerializerFactory<K> keySerializerFactory) Set a custom key serializer factory. This allows using custom serialization formats (e.g., Protocol Buffers) instead of Avro.- Parameters:
keySerializerFactory- the factory to create key serializers, or null to use default Avro serializers- Returns:
- this builder
-
setValueDeserializerFactory
public ClientConfig.ClientConfigBuilder<K,V, setValueDeserializerFactoryT> (DeserializerFactory<V> valueDeserializerFactory) Set a custom value deserializer factory. This allows using custom deserialization formats (e.g., Protocol Buffers) instead of Avro.- Parameters:
valueDeserializerFactory- the factory to create value deserializers, or null to use default Avro deserializers- Returns:
- this builder
-
clone
-
build
-