Package com.linkedin.venice.client.store
Class DelegatingStoreClient<K,V>
java.lang.Object
com.linkedin.venice.client.store.InternalAvroStoreClient<K,V>
com.linkedin.venice.client.store.DelegatingStoreClient<K,V>
- All Implemented Interfaces:
AvroGenericReadComputeStoreClient<K,
,V> AvroGenericStoreClient<K,
,V> Closeable
,AutoCloseable
- Direct Known Subclasses:
RetriableStoreClient
,StatTrackingStoreClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the values associated with the given keys and return them in a map of keys to values.void
close()
Release the internal resources.void
compute
(ComputeRequestWrapper computeRequestWrapper, Set<K> keys, org.apache.avro.Schema resultSchema, StreamingCallback<K, ComputeGenericRecord> callback, long preRequestTimeInNS) compute
(Optional<ClientStats> stats, Optional<ClientStats> streamingStats, AvroGenericReadComputeStoreClient computeStoreClient, long preRequestTimeInNS) void
computeWithKeyPrefixFilter
(byte[] keyPrefix, ComputeRequestWrapper computeRequestWrapper, StreamingCallback<org.apache.avro.generic.GenericRecord, org.apache.avro.generic.GenericRecord> callback) get
(K key, Optional<ClientStats> stats, long preRequestTimeInNS) org.apache.avro.Schema
Deprecated.org.apache.avro.Schema
Deprecated.CompletableFuture<byte[]>
getRaw
(String requestPath, Optional<ClientStats> stats, long preRequestTimeInNS) boolean
void
start()
void
This method is mainly for internal use.void
streamingBatchGet
(Set<K> keys, StreamingCallback<K, V> callback) Streaming interface forAvroGenericStoreClient.batchGet(Set)
.Methods inherited from class com.linkedin.venice.client.store.InternalAvroStoreClient
get, getRaw
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linkedin.venice.client.store.AvroGenericReadComputeStoreClient
compute, compute, compute
Methods inherited from interface com.linkedin.venice.client.store.AvroGenericStoreClient
get, streamingBatchGet
-
Constructor Details
-
DelegatingStoreClient
-
-
Method Details
-
getInnerStoreClient
-
getSchemaReader
-
isProjectionFieldValidationEnabled
public boolean isProjectionFieldValidationEnabled() -
compute
public ComputeRequestBuilder<K> compute(Optional<ClientStats> stats, Optional<ClientStats> streamingStats, AvroGenericReadComputeStoreClient computeStoreClient, long preRequestTimeInNS) throws VeniceClientException - Throws:
VeniceClientException
-
compute
public void compute(ComputeRequestWrapper computeRequestWrapper, Set<K> keys, org.apache.avro.Schema resultSchema, StreamingCallback<K, ComputeGenericRecord> callback, long preRequestTimeInNS) throws VeniceClientException- Throws:
VeniceClientException
-
batchGet
Description copied from interface:AvroGenericStoreClient
Get the values associated with the given keys and return them in a map of keys to values. Note that the returned map will only contain entries for the keys which have a value associated with them.- Returns:
- Throws:
VeniceClientException
-
streamingBatchGet
public void streamingBatchGet(Set<K> keys, StreamingCallback<K, V> callback) throws VeniceClientExceptionDescription copied from interface:AvroGenericStoreClient
Streaming interface forAvroGenericStoreClient.batchGet(Set)
. You can find more info inStreamingCallback
.- Throws:
VeniceClientException
-
start
- Throws:
VeniceClientException
-
close
public void close()Description copied from interface:AvroGenericStoreClient
Release the internal resources. -
getStoreName
-
getKeySchema
Deprecated.Description copied from interface:AvroGenericStoreClient
Get key schema. -
getLatestValueSchema
Deprecated.Description copied from interface:AvroGenericStoreClient
Get the latest value schema known in current store client. This function doesn't guarantee it will return the latest schema if you add a new value schema when current store client is running. -
get
public CompletableFuture<V> get(K key, Optional<ClientStats> stats, long preRequestTimeInNS) throws VeniceClientException - Specified by:
get
in classInternalAvroStoreClient<K,
V> - Throws:
VeniceClientException
-
getRaw
public CompletableFuture<byte[]> getRaw(String requestPath, Optional<ClientStats> stats, long preRequestTimeInNS) - Specified by:
getRaw
in classInternalAvroStoreClient<K,
V>
-
getDeserializationExecutor
- Overrides:
getDeserializationExecutor
in classInternalAvroStoreClient<K,
V>
-
computeWithKeyPrefixFilter
public void computeWithKeyPrefixFilter(byte[] keyPrefix, ComputeRequestWrapper computeRequestWrapper, StreamingCallback<org.apache.avro.generic.GenericRecord, org.apache.avro.generic.GenericRecord> callback) - Specified by:
computeWithKeyPrefixFilter
in interfaceAvroGenericReadComputeStoreClient<K,
V> - Overrides:
computeWithKeyPrefixFilter
in classInternalAvroStoreClient<K,
V>
-
startWithExceptionThrownWhenFail
public void startWithExceptionThrownWhenFail()Description copied from class:InternalAvroStoreClient
This method is mainly for internal use. The default {#start()} method will not throw an exception if the client fails to start since it is a best effort to make it compatible with the existing usage of the client (customers can trigger the start() method even before the dependency is ready). This method is mainly used to the internal startupAware callback, and it will indicate the startup failure by throwing an exception.- Specified by:
startWithExceptionThrownWhenFail
in classInternalAvroStoreClient<K,
V>
-