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(@NotNull QueryUserAssignmentLogger logger, @Nullable String policyParameters) Create a new Round Robin policy -
Method Summary
Modifier and TypeMethodDescriptionvoidafterConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current) Notify the policy that the query configuration changed.voidbeforeConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current) Notify the policy that the query configuration changed.intgetOrAssignSlot(@NotNull UserContext user, @NotNull PersistentQueryInfo queryInfo) Get the slot assignment, or assign a slot for the specified user and query.
-
Constructor Details
-
RoundRobinAssignmentPolicy
public RoundRobinAssignmentPolicy(@NotNull @NotNull QueryUserAssignmentLogger logger, @Nullable @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
public int getOrAssignSlot(@NotNull @NotNull UserContext user, @NotNull @NotNull PersistentQueryInfo queryInfo) 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 @NotNull PersistentQueryConfiguration prev, @NotNull @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 @NotNull PersistentQueryConfiguration prev, @NotNull @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
-