Package com.linkedin.venice.client.store
Class InternalAvroStoreClient<K,V>
- java.lang.Object
-
- com.linkedin.venice.client.store.InternalAvroStoreClient<K,V>
-
- All Implemented Interfaces:
AvroGenericReadComputeStoreClient<K,V>
,AvroGenericStoreClient<K,V>
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractAvroStoreClient
,DelegatingStoreClient
public abstract class InternalAvroStoreClient<K,V> extends java.lang.Object implements AvroGenericReadComputeStoreClient<K,V>
This class includes some necessary functions to deal with certain metric-handling activities that only the client implementation can be aware of. These metrics cannot be tracked from a purely-external perspective (i.e.: from theStatTrackingStoreClient
's point of view). It is intentional for these functions to not be part ofAvroGenericStoreClient
, so that the end-user does not see these extra functions on the instances they get back from theClientFactory
.
-
-
Constructor Summary
Constructors Constructor Description InternalAvroStoreClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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)
Lookup the value by given key, and get(key).get() will return null if it doesn't exist.abstract java.util.concurrent.CompletableFuture<V>
get(K key, java.util.Optional<ClientStats> stats, long preRequestTimeInNS)
java.util.concurrent.Executor
getDeserializationExecutor()
java.util.concurrent.CompletableFuture<byte[]>
getRaw(java.lang.String requestPath)
abstract java.util.concurrent.CompletableFuture<byte[]>
getRaw(java.lang.String requestPath, java.util.Optional<ClientStats> stats, long preRequestTimeInNS)
-
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, compute, compute, getSchemaReader, isProjectionFieldValidationEnabled
-
Methods inherited from interface com.linkedin.venice.client.store.AvroGenericStoreClient
batchGet, close, get, getKeySchema, getLatestValueSchema, getStoreName, start, streamingBatchGet, streamingBatchGet
-
-
-
-
Method Detail
-
getRaw
public java.util.concurrent.CompletableFuture<byte[]> getRaw(java.lang.String requestPath)
-
get
public java.util.concurrent.CompletableFuture<V> get(K key) throws VeniceClientException
Description copied from interface:AvroGenericStoreClient
Lookup the value by given key, and get(key).get() will return null if it doesn't exist. For now, if any backend error/exception happens, get(Object key).get() will throwExecutionException
, which is a wrapper of the real exception.- Specified by:
get
in interfaceAvroGenericStoreClient<K,V>
- Returns:
- Throws:
VeniceClientException
-
get
public abstract java.util.concurrent.CompletableFuture<V> get(K key, java.util.Optional<ClientStats> stats, long preRequestTimeInNS) throws VeniceClientException
- Throws:
VeniceClientException
-
getRaw
public abstract java.util.concurrent.CompletableFuture<byte[]> getRaw(java.lang.String requestPath, java.util.Optional<ClientStats> stats, long preRequestTimeInNS)
-
getDeserializationExecutor
public java.util.concurrent.Executor getDeserializationExecutor()
-
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>
-
-