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 TypeMethodDescriptionvoid
Notify the policy that the query configuration changed.void
Notify the policy that the query configuration changed.int
getOrAssignSlot
(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
- ifpolicyParameters
could not be parsed
-
-
Method Details
-
getOrAssignSlot
Description copied from interface:AssignmentPolicy
Get the slot assignment, or assign a slot for the specified user and query.- Specified by:
getOrAssignSlot
in 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:AssignmentPolicy
Notify the policy that the query configuration changed.- Specified by:
beforeConfigurationChanged
in interfaceAssignmentPolicy
- Parameters:
prev
- the old configurationcurrent
- the new configuration
-
afterConfigurationChanged
public void afterConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current) Description copied from interface:AssignmentPolicy
Notify the policy that the query configuration changed.- Specified by:
afterConfigurationChanged
in interfaceAssignmentPolicy
- Parameters:
prev
- the old configurationcurrent
- the new configuration
-