Class AbstractStoreMetadata
- java.lang.Object
-
- com.linkedin.venice.fastclient.meta.AbstractStoreMetadata
-
- All Implemented Interfaces:
StoreMetadata
,SchemaReader
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
RequestBasedMetadata
public abstract class AbstractStoreMetadata extends java.lang.Object implements StoreMetadata
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractClientRoutingStrategy
routingStrategy
protected java.lang.String
storeName
-
Constructor Summary
Constructors Constructor Description AbstractStoreMetadata(ClientConfig clientConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getBatchGetLimit()
VeniceCompressor
getCompressor(CompressionStrategy compressionStrategy, int version, CompressorFactory compressorFactory, java.util.Map<java.lang.Integer,java.nio.ByteBuffer> versionZstdDictionaryMap)
InstanceHealthMonitor
getInstanceHealthMonitor()
int
getPartitionId(int version, byte[] key)
java.util.List<java.lang.String>
getReplicas(long requestId, int version, int partitionId, int requiredReplicaCount, java.util.Set<java.lang.String> excludedInstances)
java.lang.String
getStoreName()
void
setRoutingStrategy(AbstractClientRoutingStrategy routingStrategy)
For testing only.void
setRoutingStrategy(ClientRoutingStrategyType strategyType)
ChainedCompletableFuture<java.lang.Integer,java.lang.Integer>
trackHealthBasedOnRequestToInstance(java.lang.String instance, int version, int partitionId, java.util.concurrent.CompletableFuture<TransportClientResponse> transportFuture)
-
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.schema.SchemaReader
getKeySchema, getLatestUpdateSchema, getLatestValueSchema, getLatestValueSchemaId, getUpdateSchema, getValueSchema, getValueSchemaId
-
Methods inherited from interface com.linkedin.venice.fastclient.meta.StoreMetadata
getClusterName, getCompressor, getCurrentStoreVersion, getPartitionId, getReplicas, getReplicas, isReady, start
-
-
-
-
Field Detail
-
routingStrategy
protected volatile AbstractClientRoutingStrategy routingStrategy
-
storeName
protected final java.lang.String storeName
-
-
Constructor Detail
-
AbstractStoreMetadata
public AbstractStoreMetadata(ClientConfig clientConfig)
-
-
Method Detail
-
setRoutingStrategy
public void setRoutingStrategy(ClientRoutingStrategyType strategyType)
-
setRoutingStrategy
public void setRoutingStrategy(AbstractClientRoutingStrategy routingStrategy)
For testing only.
-
getStoreName
public java.lang.String getStoreName()
- Specified by:
getStoreName
in interfaceStoreMetadata
-
getPartitionId
public int getPartitionId(int version, byte[] key)
- Specified by:
getPartitionId
in interfaceStoreMetadata
-
getReplicas
public java.util.List<java.lang.String> getReplicas(long requestId, int version, int partitionId, int requiredReplicaCount, java.util.Set<java.lang.String> excludedInstances)
- Specified by:
getReplicas
in interfaceStoreMetadata
-
trackHealthBasedOnRequestToInstance
public ChainedCompletableFuture<java.lang.Integer,java.lang.Integer> trackHealthBasedOnRequestToInstance(java.lang.String instance, int version, int partitionId, java.util.concurrent.CompletableFuture<TransportClientResponse> transportFuture)
- Specified by:
trackHealthBasedOnRequestToInstance
in interfaceStoreMetadata
-
getInstanceHealthMonitor
public InstanceHealthMonitor getInstanceHealthMonitor()
- Specified by:
getInstanceHealthMonitor
in interfaceStoreMetadata
-
getBatchGetLimit
public int getBatchGetLimit()
- Specified by:
getBatchGetLimit
in interfaceStoreMetadata
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
getCompressor
public VeniceCompressor getCompressor(CompressionStrategy compressionStrategy, int version, CompressorFactory compressorFactory, java.util.Map<java.lang.Integer,java.nio.ByteBuffer> versionZstdDictionaryMap)
-
-