Interface AssignmentPolicy
- All Known Implementing Classes:
RoundRobinAssignmentPolicy
public interface AssignmentPolicy
Implementations provide a policy for assigning users to Persistent Query replicas.
-
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.
-
Method Details
-
getOrAssignSlot
Get the slot assignment, or assign a slot for the specified user and query.- Parameters:
user
- The user to assignqueryInfo
- the QueryInfo to assign a slot for- Returns:
- the slot assignment for the user.
-
beforeConfigurationChanged
void beforeConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current) Notify the policy that the query configuration changed.- Parameters:
prev
- the old configurationcurrent
- the new configuration
-
afterConfigurationChanged
void afterConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current) Notify the policy that the query configuration changed.- Parameters:
prev
- the old configurationcurrent
- the new configuration
-