Class AbstractClientRoutingStrategy
java.lang.Object
com.linkedin.venice.fastclient.meta.AbstractClientRoutingStrategy
- Direct Known Subclasses:
HelixGroupRoutingStrategy,LeastLoadedClientRoutingStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetHelixGroupId(long requestId, int groupIdForOriginalRequest) intgetHelixGroupId(long requestId, int groupIdForOriginalRequest, int keyCount) Size-aware group selection:keyCountis the number of keys in the request, letting a strategy route by request size.getReplicas(long requestId, int groupId, List<String> replicas) booleantrackRequest(RequestContext requestContext) This method is used to track the request for any custom logic that needs to be executed when a request is sent.voidupdateHelixGroupInfo(Map<String, Integer> instanceToHelixGroupIdMap)
-
Constructor Details
-
AbstractClientRoutingStrategy
public AbstractClientRoutingStrategy()
-
-
Method Details
-
getReplicas
-
updateHelixGroupInfo
-
getHelixGroupId
public int getHelixGroupId(long requestId, int groupIdForOriginalRequest) -
getHelixGroupId
public int getHelixGroupId(long requestId, int groupIdForOriginalRequest, int keyCount) Size-aware group selection:keyCountis the number of keys in the request, letting a strategy route by request size. Defaults to the size-agnosticgetHelixGroupId(long, int)so strategies that do not care about request size need no change. -
trackRequest
This method is used to track the request for any custom logic that needs to be executed when a request is sent.- Returns:
- boolean to indicate whether the request is tracked or not.
-