Class MultiKeyRequestContext<K,V>

java.lang.Object
com.linkedin.venice.fastclient.RequestContext
com.linkedin.venice.fastclient.MultiKeyRequestContext<K,V>
Type Parameters:
K - Key type
V - Value type
Direct Known Subclasses:
BatchGetRequestContext, ComputeRequestContext

public abstract class MultiKeyRequestContext<K,V> extends RequestContext
Keep track of the progress of a multi-key requests - batch get and compute. This includes tracking all the scatter requests and utilities to gather responses.
  • Constructor Details

    • MultiKeyRequestContext

      public MultiKeyRequestContext(int numKeysInRequest, boolean isPartialSuccessAllowed)
  • Method Details

    • setKeys

      public void setKeys(Set<K> keys)
    • getKeys

      public Set<K> getKeys()
    • addKey

      public void addKey(String route, K key, byte[] serializedKey, int partitionId)
    • getRoutes

      public Set<String> getRoutes()
    • copyStateToRetryRequestContext

      protected void copyStateToRetryRequestContext(MultiKeyRequestContext<K,V> retryContext)
    • getRoutesForPartitionMapping

      public Map<Integer,Set<String>> getRoutesForPartitionMapping()
    • setRoutesForPartitionMapping

      public void setRoutesForPartitionMapping(Map<Integer,Set<String>> routesForPartition)
    • setFanoutSize

      public void setFanoutSize(int fanoutSize)
    • getFanoutSize

      public int getFanoutSize()