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> Closeable
,AutoCloseable
- Direct Known Subclasses:
AbstractAvroStoreClient
,DelegatingStoreClient
public abstract class InternalAvroStoreClient<K,V>
extends 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 the
StatTrackingStoreClient
's point of view).
It is intentional for these functions to not be part of AvroGenericStoreClient
, so that the
end-user does not see these extra functions on the instances they get back from the
ClientFactory
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
computeWithKeyPrefixFilter
(byte[] keyPrefix, ComputeRequestWrapper computeRequestWrapper, StreamingCallback<org.apache.avro.generic.GenericRecord, org.apache.avro.generic.GenericRecord> callback) Lookup the value by given key, and get(key).get() will return null if it doesn't exist.abstract CompletableFuture<V>
get
(K key, Optional<ClientStats> stats, long preRequestTimeInNS) CompletableFuture<byte[]>
abstract CompletableFuture<byte[]>
getRaw
(String requestPath, Optional<ClientStats> stats, long preRequestTimeInNS) abstract void
This method is mainly for internal use.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
-
Constructor Details
-
InternalAvroStoreClient
public InternalAvroStoreClient()
-
-
Method Details
-
getRaw
-
get
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 CompletableFuture<V> get(K key, Optional<ClientStats> stats, long preRequestTimeInNS) throws VeniceClientException - Throws:
VeniceClientException
-
getRaw
public abstract CompletableFuture<byte[]> getRaw(String requestPath, Optional<ClientStats> stats, long preRequestTimeInNS) -
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>
-
startWithExceptionThrownWhenFail
public abstract void startWithExceptionThrownWhenFail()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.
-