Class CachingVeniceStoreClientFactory
- java.lang.Object
-
- com.linkedin.venice.client.factory.CachingVeniceStoreClientFactory
-
- All Implemented Interfaces:
VeniceStoreClientFactory
public class CachingVeniceStoreClientFactory extends java.lang.Object implements VeniceStoreClientFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.linkedin.venice.client.factory.VeniceStoreClientFactory
VeniceStoreClientFactory.ClientConfigUpdater
-
-
Constructor Summary
Constructors Constructor Description CachingVeniceStoreClientFactory(ClientConfig clientConfig)
CachingVeniceStoreClientFactory(ClientConfig clientConfig, VeniceStoreClientGlobalConfig globalConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
<K,V>
AvroGenericStoreClient<K,V>getAndStartAvroGenericStoreClient(java.lang.String storeName)
<K,V>
AvroGenericStoreClient<K,V>getAndStartAvroGenericStoreClient(java.lang.String storeName, VeniceStoreClientFactory.ClientConfigUpdater configUpdater)
create a generic client along with customized client configs.<K,V extends org.apache.avro.specific.SpecificRecord>
AvroSpecificStoreClient<K,V>getAndStartAvroSpecificStoreClient(java.lang.String storeName, java.lang.Class<V> specificRecordClass)
<K,V extends org.apache.avro.specific.SpecificRecord>
AvroSpecificStoreClient<K,V>getAndStartAvroSpecificStoreClient(java.lang.String storeName, java.lang.Class<V> specificRecordClass, VeniceStoreClientFactory.ClientConfigUpdater configUpdater)
-
-
-
Constructor Detail
-
CachingVeniceStoreClientFactory
public CachingVeniceStoreClientFactory(ClientConfig clientConfig)
-
CachingVeniceStoreClientFactory
public CachingVeniceStoreClientFactory(ClientConfig clientConfig, VeniceStoreClientGlobalConfig globalConfig)
-
-
Method Detail
-
getAndStartAvroGenericStoreClient
public <K,V> AvroGenericStoreClient<K,V> getAndStartAvroGenericStoreClient(java.lang.String storeName)
- Specified by:
getAndStartAvroGenericStoreClient
in interfaceVeniceStoreClientFactory
-
getAndStartAvroGenericStoreClient
public <K,V> AvroGenericStoreClient<K,V> getAndStartAvroGenericStoreClient(java.lang.String storeName, VeniceStoreClientFactory.ClientConfigUpdater configUpdater)
Description copied from interface:VeniceStoreClientFactory
create a generic client along with customized client configs. This is only for sophisticated use cases. Do not use it if you are not familiar with these configs. e.g. client = veniceStoreClientFactory.getAndStartAvroGenericStoreClient(storeName, (config) -> config.setVsonClient(true));- Specified by:
getAndStartAvroGenericStoreClient
in interfaceVeniceStoreClientFactory
- Returns:
-
getAndStartAvroSpecificStoreClient
public <K,V extends org.apache.avro.specific.SpecificRecord> AvroSpecificStoreClient<K,V> getAndStartAvroSpecificStoreClient(java.lang.String storeName, java.lang.Class<V> specificRecordClass)
- Specified by:
getAndStartAvroSpecificStoreClient
in interfaceVeniceStoreClientFactory
-
getAndStartAvroSpecificStoreClient
public <K,V extends org.apache.avro.specific.SpecificRecord> AvroSpecificStoreClient<K,V> getAndStartAvroSpecificStoreClient(java.lang.String storeName, java.lang.Class<V> specificRecordClass, VeniceStoreClientFactory.ClientConfigUpdater configUpdater)
- Specified by:
getAndStartAvroSpecificStoreClient
in interfaceVeniceStoreClientFactory
-
close
public void close()
- Specified by:
close
in interfaceVeniceStoreClientFactory
-
-