Class ClientConfig<T extends org.apache.avro.specific.SpecificRecord>


  • public class ClientConfig<T extends org.apache.avro.specific.SpecificRecord>
    extends java.lang.Object
    • Field Detail

      • 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
    • Constructor Detail

      • ClientConfig

        public ClientConfig()
      • ClientConfig

        public ClientConfig​(java.lang.String storeName)
    • 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()
      • 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 use Executors.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)
      • 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object