Package com.linkedin.venice.client.store
Class ClientConfig<T extends org.apache.avro.specific.SpecificRecord>
- java.lang.Object
-
- com.linkedin.venice.client.store.ClientConfig<T>
-
public class ClientConfig<T extends org.apache.avro.specific.SpecificRecord> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_CLUSTER_DISCOVERY_D2_SERVICE_NAME
static java.lang.String
DEFAULT_D2_ZK_BASE_PATH
static java.time.Duration
DEFAULT_SCHEMA_REFRESH_PERIOD
static int
DEFAULT_ZK_TIMEOUT_MS
-
Constructor Summary
Constructors Constructor Description ClientConfig()
ClientConfig(java.lang.String storeName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <V extends org.apache.avro.specific.SpecificRecord>
ClientConfig<V>cloneConfig(ClientConfig<V> config)
static ClientConfig
defaultGenericClientConfig(java.lang.String storeName)
static <V extends org.apache.avro.specific.SpecificRecord>
ClientConfig<V>defaultSpecificClientConfig(java.lang.String storeName, java.lang.Class<V> specificValueClass)
static ClientConfig
defaultVsonGenericClientConfig(java.lang.String storeName)
Deprecated.boolean
equals(java.lang.Object o)
BatchDeserializer
getBatchGetDeserializer(java.util.concurrent.Executor executor)
java.lang.String
getD2BasePath()
com.linkedin.d2.balancer.D2Client
getD2Client()
java.lang.String
getD2ServiceName()
int
getD2ZkTimeout()
java.util.concurrent.Executor
getDeserializationExecutor()
int
getMaxConnectionsPerRoute()
int
getMaxConnectionsTotal()
io.tehuti.metrics.MetricsRepository
getMetricsRepository()
java.util.Optional<java.util.function.Predicate<org.apache.avro.Schema>>
getPreferredSchemaFilter()
long
getRetryBackOffInMs()
int
getRetryCount()
java.util.concurrent.Executor
getRetryExecutor()
java.time.Duration
getSchemaRefreshPeriod()
java.lang.Class<T>
getSpecificValueClass()
SSLFactory
getSslFactory()
java.lang.String
getStatsPrefix()
java.lang.String
getStoreName()
io.tehuti.utils.Time
getTime()
java.lang.String
getVeniceURL()
int
hashCode()
boolean
isD2Routing()
boolean
isForceClusterDiscoveryAtStartTime()
boolean
isHttpClient5Http2Enabled()
boolean
isHttps()
boolean
isProjectionFieldValidationEnabled()
boolean
isRemoteComputationOnly()
boolean
isRetryOnAllErrorsEnabled()
boolean
isRetryOnRouterErrorEnabled()
boolean
isSpecificClient()
boolean
isUseBlackHoleDeserializer()
boolean
isUseFastAvro()
boolean
isVsonClient()
Deprecated.ClientConfig<T>
setAlwaysOnDeserializerNumberOfThreads(int alwaysOnDeserializerNumberOfThreads)
Deprecated.ClientConfig<T>
setAlwaysOnDeserializerQueueCapacity(int alwaysOnDeserializerQueueCapacity)
Deprecated.ClientConfig<T>
setBatchDeserializerType(BatchDeserializerType batchDeserializerType)
ClientConfig<T>
setD2BasePath(java.lang.String d2BasePath)
ClientConfig<T>
setD2Client(com.linkedin.d2.balancer.D2Client d2Client)
ClientConfig<T>
setD2ServiceName(java.lang.String d2ServiceName)
ClientConfig<T>
setD2ZkTimeout(int d2ZkTimeout)
ClientConfig<T>
setDeserializationExecutor(java.util.concurrent.Executor deserializationExecutor)
Provide an arbitrary executor to execute client requests in, rather than letting the client use its own internally-generated executor.ClientConfig<T>
setForceClusterDiscoveryAtStartTime(boolean forceClusterDiscoveryAtStartTime)
ClientConfig<T>
setHttpClient5Http2Enabled(boolean httpClient5Http2Enabled)
ClientConfig<T>
setMaxConnectionsPerRoute(int maxConnectionsPerRoute)
ClientConfig<T>
setMaxConnectionsTotal(int maxConnectionsTotal)
ClientConfig<T>
setMetricsRepository(io.tehuti.metrics.MetricsRepository metricsRepository)
ClientConfig<T>
setMultiGetEnvelopeIterableImpl(AvroGenericDeserializer.IterableImpl multiGetEnvelopeIterableImpl)
Deprecated.ClientConfig<T>
setOnDemandDeserializerNumberOfRecordsPerThread(int onDemandDeserializerNumberOfRecordsPerThread)
Deprecated.ClientConfig<T>
setPreferredSchemaFilter(java.util.function.Predicate<org.apache.avro.Schema> preferredSchemaFilter)
ClientConfig<T>
setProjectionFieldValidationEnabled(boolean projectionFieldValidation)
ClientConfig<T>
setRemoteComputationOnly(boolean remoteComputationOnly)
ClientConfig<T>
setRetryBackOffInMs(long retryBackOffInMs)
ClientConfig<T>
setRetryCount(int retryCount)
ClientConfig<T>
setRetryExecutor(java.util.concurrent.Executor retryExecutor)
ClientConfig<T>
setRetryOnAllErrors(boolean value)
ClientConfig<T>
setRetryOnRouterError(boolean value)
ClientConfig<T>
setSchemaRefreshPeriod(java.time.Duration schemaRefreshPeriod)
ClientConfig<T>
setSpecificValueClass(java.lang.Class<T> specificValueClass)
ClientConfig<T>
setSslFactory(SSLFactory sslEngineComponentFactory)
ClientConfig<T>
setStatsPrefix(java.lang.String statsPrefix)
ClientConfig<T>
setStoreName(java.lang.String storeName)
ClientConfig<T>
setTime(io.tehuti.utils.Time time)
ClientConfig<T>
setUseBlackHoleDeserializer(boolean useBlackHoleDeserializer)
ClientConfig<T>
setUseFastAvro(boolean useFastAvro)
ClientConfig<T>
setVeniceURL(java.lang.String veniceURL)
ClientConfig<T>
setVsonClient(boolean isVonClient)
Deprecated.
-
-
-
Field Detail
-
DEFAULT_ZK_TIMEOUT_MS
public static final int DEFAULT_ZK_TIMEOUT_MS
- See Also:
- Constant Field Values
-
DEFAULT_CLUSTER_DISCOVERY_D2_SERVICE_NAME
public static final java.lang.String DEFAULT_CLUSTER_DISCOVERY_D2_SERVICE_NAME
- See Also:
- Constant Field Values
-
DEFAULT_D2_ZK_BASE_PATH
public static final java.lang.String DEFAULT_D2_ZK_BASE_PATH
- See Also:
- Constant Field Values
-
DEFAULT_SCHEMA_REFRESH_PERIOD
public static final java.time.Duration DEFAULT_SCHEMA_REFRESH_PERIOD
-
-
Method Detail
-
defaultGenericClientConfig
public static ClientConfig defaultGenericClientConfig(java.lang.String storeName)
-
defaultVsonGenericClientConfig
@Deprecated public static ClientConfig defaultVsonGenericClientConfig(java.lang.String storeName)
Deprecated.
-
defaultSpecificClientConfig
public static <V extends org.apache.avro.specific.SpecificRecord> ClientConfig<V> defaultSpecificClientConfig(java.lang.String storeName, java.lang.Class<V> specificValueClass)
-
cloneConfig
public static <V extends org.apache.avro.specific.SpecificRecord> ClientConfig<V> cloneConfig(ClientConfig<V> config)
-
getStoreName
public java.lang.String getStoreName()
-
setStoreName
public ClientConfig<T> setStoreName(java.lang.String storeName)
-
isForceClusterDiscoveryAtStartTime
public boolean isForceClusterDiscoveryAtStartTime()
-
setForceClusterDiscoveryAtStartTime
public ClientConfig<T> setForceClusterDiscoveryAtStartTime(boolean forceClusterDiscoveryAtStartTime)
-
getVeniceURL
public java.lang.String getVeniceURL()
-
setVeniceURL
public ClientConfig<T> setVeniceURL(java.lang.String veniceURL)
- Parameters:
veniceURL
- If using D2, this should be D2 ZK address. Otherwise, it should be router address.
-
getStatsPrefix
public java.lang.String getStatsPrefix()
-
setStatsPrefix
public ClientConfig<T> setStatsPrefix(java.lang.String statsPrefix)
-
getSpecificValueClass
public java.lang.Class<T> getSpecificValueClass()
-
setSpecificValueClass
public ClientConfig<T> setSpecificValueClass(java.lang.Class<T> specificValueClass)
-
isSpecificClient
public boolean isSpecificClient()
-
isD2Routing
public boolean isD2Routing()
-
getD2ServiceName
public java.lang.String getD2ServiceName()
-
setD2ServiceName
public ClientConfig<T> setD2ServiceName(java.lang.String d2ServiceName)
-
getD2BasePath
public java.lang.String getD2BasePath()
-
setD2BasePath
public ClientConfig<T> setD2BasePath(java.lang.String d2BasePath)
-
getD2ZkTimeout
public int getD2ZkTimeout()
-
setD2ZkTimeout
public ClientConfig<T> setD2ZkTimeout(int d2ZkTimeout)
-
getD2Client
public com.linkedin.d2.balancer.D2Client getD2Client()
-
setD2Client
public ClientConfig<T> setD2Client(com.linkedin.d2.balancer.D2Client d2Client)
-
isHttps
public boolean isHttps()
-
getSslFactory
public SSLFactory getSslFactory()
-
setSslFactory
public ClientConfig<T> setSslFactory(SSLFactory sslEngineComponentFactory)
-
getMaxConnectionsPerRoute
public int getMaxConnectionsPerRoute()
-
setMaxConnectionsPerRoute
public ClientConfig<T> setMaxConnectionsPerRoute(int maxConnectionsPerRoute)
-
getMaxConnectionsTotal
public int getMaxConnectionsTotal()
-
setMaxConnectionsTotal
public ClientConfig<T> setMaxConnectionsTotal(int maxConnectionsTotal)
-
isHttpClient5Http2Enabled
public boolean isHttpClient5Http2Enabled()
-
setHttpClient5Http2Enabled
public ClientConfig<T> setHttpClient5Http2Enabled(boolean httpClient5Http2Enabled)
-
getMetricsRepository
public io.tehuti.metrics.MetricsRepository getMetricsRepository()
-
setMetricsRepository
public ClientConfig<T> setMetricsRepository(io.tehuti.metrics.MetricsRepository metricsRepository)
-
getDeserializationExecutor
public java.util.concurrent.Executor getDeserializationExecutor()
-
setDeserializationExecutor
public ClientConfig<T> setDeserializationExecutor(java.util.concurrent.Executor deserializationExecutor)
Provide an arbitrary executor to execute client requests in, rather than letting the client use its own internally-generated executor. If null, or unset, the client will useExecutors.newFixedThreadPool(int)
with a thread limit equal to half the CPU cores.
-
isVsonClient
@Deprecated public boolean isVsonClient()
Deprecated.
-
setVsonClient
@Deprecated public ClientConfig<T> setVsonClient(boolean isVonClient)
Deprecated.
-
getBatchGetDeserializer
public BatchDeserializer getBatchGetDeserializer(java.util.concurrent.Executor executor)
-
setBatchDeserializerType
public ClientConfig<T> setBatchDeserializerType(BatchDeserializerType batchDeserializerType)
-
setMultiGetEnvelopeIterableImpl
@Deprecated public ClientConfig<T> setMultiGetEnvelopeIterableImpl(AvroGenericDeserializer.IterableImpl multiGetEnvelopeIterableImpl)
Deprecated.
-
setOnDemandDeserializerNumberOfRecordsPerThread
@Deprecated public ClientConfig<T> setOnDemandDeserializerNumberOfRecordsPerThread(int onDemandDeserializerNumberOfRecordsPerThread)
Deprecated.
-
setAlwaysOnDeserializerNumberOfThreads
@Deprecated public ClientConfig<T> setAlwaysOnDeserializerNumberOfThreads(int alwaysOnDeserializerNumberOfThreads)
Deprecated.
-
setAlwaysOnDeserializerQueueCapacity
@Deprecated public ClientConfig<T> setAlwaysOnDeserializerQueueCapacity(int alwaysOnDeserializerQueueCapacity)
Deprecated.
-
isUseFastAvro
public boolean isUseFastAvro()
-
setUseFastAvro
public ClientConfig<T> setUseFastAvro(boolean useFastAvro)
-
setRetryOnRouterError
public ClientConfig<T> setRetryOnRouterError(boolean value)
-
isRetryOnRouterErrorEnabled
public boolean isRetryOnRouterErrorEnabled()
-
setRetryOnAllErrors
public ClientConfig<T> setRetryOnAllErrors(boolean value)
-
isRetryOnAllErrorsEnabled
public boolean isRetryOnAllErrorsEnabled()
-
setRetryCount
public ClientConfig<T> setRetryCount(int retryCount)
-
getRetryCount
public int getRetryCount()
-
setRetryBackOffInMs
public ClientConfig<T> setRetryBackOffInMs(long retryBackOffInMs)
-
getRetryBackOffInMs
public long getRetryBackOffInMs()
-
getRetryExecutor
public java.util.concurrent.Executor getRetryExecutor()
-
setRetryExecutor
public ClientConfig<T> setRetryExecutor(java.util.concurrent.Executor retryExecutor)
-
isUseBlackHoleDeserializer
public boolean isUseBlackHoleDeserializer()
-
setUseBlackHoleDeserializer
public ClientConfig<T> setUseBlackHoleDeserializer(boolean useBlackHoleDeserializer)
-
isProjectionFieldValidationEnabled
public boolean isProjectionFieldValidationEnabled()
-
setProjectionFieldValidationEnabled
public ClientConfig<T> setProjectionFieldValidationEnabled(boolean projectionFieldValidation)
-
isRemoteComputationOnly
public boolean isRemoteComputationOnly()
-
setRemoteComputationOnly
public ClientConfig<T> setRemoteComputationOnly(boolean remoteComputationOnly)
-
getPreferredSchemaFilter
public java.util.Optional<java.util.function.Predicate<org.apache.avro.Schema>> getPreferredSchemaFilter()
-
setPreferredSchemaFilter
public ClientConfig<T> setPreferredSchemaFilter(java.util.function.Predicate<org.apache.avro.Schema> preferredSchemaFilter)
-
getSchemaRefreshPeriod
public java.time.Duration getSchemaRefreshPeriod()
-
setSchemaRefreshPeriod
public ClientConfig<T> setSchemaRefreshPeriod(java.time.Duration schemaRefreshPeriod)
-
getTime
public io.tehuti.utils.Time getTime()
-
setTime
public ClientConfig<T> setTime(io.tehuti.utils.Time time)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-