Package com.linkedin.venice.fastclient
Class RequestContext
java.lang.Object
com.linkedin.venice.fastclient.RequestContext
- Direct Known Subclasses:
GetRequestContext,MultiKeyRequestContext
This class is used to include all the intermediate fields required for the communication between the different tiers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNonAvailableReplicaPartition(int partitionId) intintintNumber of keys in this request, used to route and attribute latency by request size.longabstract RequestTypebooleanbooleanWhether any part of this request failed even though it may have completed normally (partial-success requests).booleanbooleanWhether a retry was sent for this request, in which case part of it may have been served by another group.voidsetCurrentVersion(int currentVersion) voidsetHelixGroupId(int helixGroupId) voidsetInstanceHealthMonitor(InstanceHealthMonitor instanceHealthMonitor) voidsetRequestId(long requestId) voidsetRequestSerializationTime(double latency) voidsetResultFuture(CompletableFuture resultFuture) voidsetRetryRequest(boolean retryRequest) voidsetServerClusterName(String serverClusterName)
-
Constructor Details
-
RequestContext
public RequestContext()
-
-
Method Details
-
getRequestType
-
getKeyCount
public int getKeyCount()Number of keys in this request, used to route and attribute latency by request size. Defaults to a single key; the multi-key context reports its actual batch size. -
hasPartialResponseFailure
public boolean hasPartialResponseFailure()Whether any part of this request failed even though it may have completed normally (partial-success requests). -
isRetryTriggered
public boolean isRetryTriggered()Whether a retry was sent for this request, in which case part of it may have been served by another group. -
setServerClusterName
-
getServerClusterName
-
setInstanceHealthMonitor
-
getInstanceHealthMonitor
-
isRetryRequest
public boolean isRetryRequest() -
setRetryRequest
public void setRetryRequest(boolean retryRequest) -
getResultFuture
-
setResultFuture
-
setRequestId
public void setRequestId(long requestId) -
getRequestId
public long getRequestId() -
getHelixGroupId
public int getHelixGroupId() -
setHelixGroupId
public void setHelixGroupId(int helixGroupId) -
addNonAvailableReplicaPartition
public void addNonAvailableReplicaPartition(int partitionId) -
getNonAvailableReplicaPartitions
-
getCurrentVersion
public int getCurrentVersion() -
setCurrentVersion
public void setCurrentVersion(int currentVersion) -
getRouteRequestMap
-
hasNonAvailablePartition
public boolean hasNonAvailablePartition() -
setRequestSerializationTime
public void setRequestSerializationTime(double latency)
-