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>
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
RetriableStoreClient
,StatTrackingStoreClient
public class DelegatingStoreClient<K,V> extends InternalAvroStoreClient<K,V>
-
-
Constructor Summary
Constructors Constructor Description DelegatingStoreClient(InternalAvroStoreClient<K,V> innerStoreClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.util.Map<K,V>>
batchGet(java.util.Set<K> keys)
Get 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, java.util.Set<K> keys, org.apache.avro.Schema resultSchema, StreamingCallback<K,ComputeGenericRecord> callback, long preRequestTimeInNS)
ComputeRequestBuilder<K>
compute(java.util.Optional<ClientStats> stats, java.util.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)
java.util.concurrent.CompletableFuture<V>
get(K key, java.util.Optional<ClientStats> stats, long preRequestTimeInNS)
java.util.concurrent.Executor
getDeserializationExecutor()
InternalAvroStoreClient<K,V>
getInnerStoreClient()
org.apache.avro.Schema
getKeySchema()
Deprecated.org.apache.avro.Schema
getLatestValueSchema()
Deprecated.java.util.concurrent.CompletableFuture<byte[]>
getRaw(java.lang.String requestPath, java.util.Optional<ClientStats> stats, long preRequestTimeInNS)
SchemaReader
getSchemaReader()
java.lang.String
getStoreName()
boolean
isProjectionFieldValidationEnabled()
void
start()
void
streamingBatchGet(java.util.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 Detail
-
DelegatingStoreClient
public DelegatingStoreClient(InternalAvroStoreClient<K,V> innerStoreClient)
-
-
Method Detail
-
getInnerStoreClient
public InternalAvroStoreClient<K,V> getInnerStoreClient()
-
getSchemaReader
public SchemaReader getSchemaReader()
-
isProjectionFieldValidationEnabled
public boolean isProjectionFieldValidationEnabled()
-
compute
public ComputeRequestBuilder<K> compute(java.util.Optional<ClientStats> stats, java.util.Optional<ClientStats> streamingStats, AvroGenericReadComputeStoreClient computeStoreClient, long preRequestTimeInNS) throws VeniceClientException
- Throws:
VeniceClientException
-
compute
public void compute(ComputeRequestWrapper computeRequestWrapper, java.util.Set<K> keys, org.apache.avro.Schema resultSchema, StreamingCallback<K,ComputeGenericRecord> callback, long preRequestTimeInNS) throws VeniceClientException
- Throws:
VeniceClientException
-
batchGet
public java.util.concurrent.CompletableFuture<java.util.Map<K,V>> batchGet(java.util.Set<K> keys) throws VeniceClientException
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(java.util.Set<K> keys, StreamingCallback<K,V> callback) throws VeniceClientException
Description copied from interface:AvroGenericStoreClient
Streaming interface forAvroGenericStoreClient.batchGet(Set)
. You can find more info inStreamingCallback
.- Throws:
VeniceClientException
-
start
public void start() throws VeniceClientException
- Throws:
VeniceClientException
-
close
public void close()
Description copied from interface:AvroGenericStoreClient
Release the internal resources.
-
getStoreName
public java.lang.String getStoreName()
-
getKeySchema
@Deprecated public org.apache.avro.Schema getKeySchema()
Deprecated.Description copied from interface:AvroGenericStoreClient
Get key schema.
-
getLatestValueSchema
@Deprecated public org.apache.avro.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 java.util.concurrent.CompletableFuture<V> get(K key, java.util.Optional<ClientStats> stats, long preRequestTimeInNS) throws VeniceClientException
- Specified by:
get
in classInternalAvroStoreClient<K,V>
- Throws:
VeniceClientException
-
getRaw
public java.util.concurrent.CompletableFuture<byte[]> getRaw(java.lang.String requestPath, java.util.Optional<ClientStats> stats, long preRequestTimeInNS)
- Specified by:
getRaw
in classInternalAvroStoreClient<K,V>
-
getDeserializationExecutor
public java.util.concurrent.Executor 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>
-
-