Class HelixGroupRoundRobinStrategy
java.lang.Object
com.linkedin.venice.router.api.routing.helix.HelixGroupRoundRobinStrategy
- All Implemented Interfaces:
HelixGroupSelectionStrategy
This simple strategy will try to distribute the load evenly to every Helix Group.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
finishRequest
(long requestId, int groupId, double latency) Notify the corresponding Helix Group that the request is completed, and the implementation will decide whether any cleanup is required or not.int
selectGroup
(long requestId, int groupNum) Select a Helix Group for the current request.
-
Constructor Details
-
HelixGroupRoundRobinStrategy
public HelixGroupRoundRobinStrategy()
-
-
Method Details
-
selectGroup
public int selectGroup(long requestId, int groupNum) Description copied from interface:HelixGroupSelectionStrategy
Select a Helix Group for the current request.- Specified by:
selectGroup
in interfaceHelixGroupSelectionStrategy
-
finishRequest
public void finishRequest(long requestId, int groupId, double latency) Description copied from interface:HelixGroupSelectionStrategy
Notify the corresponding Helix Group that the request is completed, and the implementation will decide whether any cleanup is required or not.- Specified by:
finishRequest
in interfaceHelixGroupSelectionStrategy
-