Class CachingDaVinciClientFactory
- java.lang.Object
-
- com.linkedin.davinci.client.factory.CachingDaVinciClientFactory
-
- All Implemented Interfaces:
DaVinciClientFactory
,java.io.Closeable
,java.lang.AutoCloseable
public class CachingDaVinciClientFactory extends java.lang.Object implements DaVinciClientFactory, java.io.Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
CachingDaVinciClientFactory.DaVinciClientConstructor
-
Field Summary
Fields Modifier and Type Field Description protected VeniceProperties
backendConfig
protected boolean
closed
protected java.util.Map<java.lang.String,DaVinciConfig>
configs
protected com.linkedin.d2.balancer.D2Client
d2Client
protected ICProvider
icProvider
protected java.util.List<DaVinciClient>
isolatedClients
protected java.util.Optional<java.util.Set<java.lang.String>>
managedClients
protected io.tehuti.metrics.MetricsRepository
metricsRepository
protected java.util.Map<java.lang.String,DaVinciClient>
sharedClients
-
Constructor Summary
Constructors Constructor Description CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig)
Deprecated.CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients)
Deprecated.CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients, ICProvider icProvider)
Deprecated.CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig)
CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients)
CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients, ICProvider icProvider)
CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients, ICProvider icProvider, java.util.concurrent.Executor readChunkExecutorForLargeRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
<K,V>
DaVinciClient<K,V>getAndStartGenericAvroClient(java.lang.String storeName, DaVinciConfig config)
<K,V>
DaVinciClient<K,V>getAndStartGenericAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
<K,V extends org.apache.avro.specific.SpecificRecord>
DaVinciClient<K,V>getAndStartSpecificAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
VeniceProperties
getBackendConfig()
protected DaVinciClient
getClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class valueClass, CachingDaVinciClientFactory.DaVinciClientConstructor clientConstructor, java.lang.Class clientClass, boolean startClient)
<K,V>
DaVinciClient<K,V>getGenericAvroClient(java.lang.String storeName, DaVinciConfig config)
<K,V>
DaVinciClient<K,V>getGenericAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
<K,V extends org.apache.avro.specific.SpecificRecord>
DaVinciClient<K,V>getSpecificAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
-
-
-
Field Detail
-
closed
protected boolean closed
-
d2Client
protected final com.linkedin.d2.balancer.D2Client d2Client
-
metricsRepository
protected final io.tehuti.metrics.MetricsRepository metricsRepository
-
backendConfig
protected final VeniceProperties backendConfig
-
managedClients
protected final java.util.Optional<java.util.Set<java.lang.String>> managedClients
-
icProvider
protected final ICProvider icProvider
-
sharedClients
protected final java.util.Map<java.lang.String,DaVinciClient> sharedClients
-
isolatedClients
protected final java.util.List<DaVinciClient> isolatedClients
-
configs
protected final java.util.Map<java.lang.String,DaVinciConfig> configs
-
-
Constructor Detail
-
CachingDaVinciClientFactory
@Deprecated public CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig)
Deprecated.
-
CachingDaVinciClientFactory
@Deprecated public CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients)
Deprecated.
-
CachingDaVinciClientFactory
@Deprecated public CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients, ICProvider icProvider)
Deprecated.
-
CachingDaVinciClientFactory
public CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig)
-
CachingDaVinciClientFactory
public CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients)
-
CachingDaVinciClientFactory
public CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients, ICProvider icProvider)
-
CachingDaVinciClientFactory
public CachingDaVinciClientFactory(com.linkedin.d2.balancer.D2Client d2Client, java.lang.String clusterDiscoveryD2ServiceName, io.tehuti.metrics.MetricsRepository metricsRepository, VeniceProperties backendConfig, java.util.Optional<java.util.Set<java.lang.String>> managedClients, ICProvider icProvider, java.util.concurrent.Executor readChunkExecutorForLargeRequest)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
getGenericAvroClient
public <K,V> DaVinciClient<K,V> getGenericAvroClient(java.lang.String storeName, DaVinciConfig config)
- Specified by:
getGenericAvroClient
in interfaceDaVinciClientFactory
-
getGenericAvroClient
public <K,V> DaVinciClient<K,V> getGenericAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
-
getAndStartGenericAvroClient
public <K,V> DaVinciClient<K,V> getAndStartGenericAvroClient(java.lang.String storeName, DaVinciConfig config)
- Specified by:
getAndStartGenericAvroClient
in interfaceDaVinciClientFactory
-
getAndStartGenericAvroClient
public <K,V> DaVinciClient<K,V> getAndStartGenericAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
-
getSpecificAvroClient
public <K,V extends org.apache.avro.specific.SpecificRecord> DaVinciClient<K,V> getSpecificAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
- Specified by:
getSpecificAvroClient
in interfaceDaVinciClientFactory
-
getAndStartSpecificAvroClient
public <K,V extends org.apache.avro.specific.SpecificRecord> DaVinciClient<K,V> getAndStartSpecificAvroClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class<V> valueClass)
- Specified by:
getAndStartSpecificAvroClient
in interfaceDaVinciClientFactory
-
getBackendConfig
public VeniceProperties getBackendConfig()
-
getClient
protected DaVinciClient getClient(java.lang.String storeName, DaVinciConfig config, java.lang.Class valueClass, CachingDaVinciClientFactory.DaVinciClientConstructor clientConstructor, java.lang.Class clientClass, boolean startClient)
-
-