Class RoundRobinAssignmentPolicy
java.lang.Object
io.deephaven.enterprise.controller.assignment.RoundRobinAssignmentPolicy
- All Implemented Interfaces:
AssignmentPolicy
An
AssignmentPolicy that assigns users to replicas in a round-robin fashion.-
Constructor Summary
ConstructorsConstructorDescriptionRoundRobinAssignmentPolicy(QueryUserAssignmentLogger logger, String policyParameters) Create a new Round Robin policy -
Method Summary
Modifier and TypeMethodDescriptionvoidNotify the policy that the query configuration changed.voidNotify the policy that the query configuration changed.intgetOrAssignSlot(UserContext user, PersistentQueryInfo queryInfo) Get the slot assignment, or assign a slot for the specified user and query.
-
Constructor Details
-
RoundRobinAssignmentPolicy
public RoundRobinAssignmentPolicy(@NotNull QueryUserAssignmentLogger logger, @Nullable String policyParameters) throws io.deephaven.shadow.jackson.com.fasterxml.jackson.core.JsonProcessingException Create a new Round Robin policy- Parameters:
logger- a logger to record assignment changespolicyParameters- policy parameters -- not used- Throws:
io.deephaven.shadow.jackson.com.fasterxml.jackson.core.JsonProcessingException- ifpolicyParameterscould not be parsed
-
-
Method Details
-
getOrAssignSlot
Description copied from interface:AssignmentPolicyGet the slot assignment, or assign a slot for the specified user and query.- Specified by:
getOrAssignSlotin interfaceAssignmentPolicy- Parameters:
user- The user to assignqueryInfo- the QueryInfo to assign a slot for- Returns:
- the slot assignment for the user.
-
beforeConfigurationChanged
public void beforeConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current) Description copied from interface:AssignmentPolicyNotify the policy that the query configuration changed.- Specified by:
beforeConfigurationChangedin interfaceAssignmentPolicy- Parameters:
prev- the old configurationcurrent- the new configuration
-
afterConfigurationChanged
public void afterConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current) Description copied from interface:AssignmentPolicyNotify the policy that the query configuration changed.- Specified by:
afterConfigurationChangedin interfaceAssignmentPolicy- Parameters:
prev- the old configurationcurrent- the new configuration
-