Interface AssignmentPolicy

All Known Implementing Classes:
RoundRobinAssignmentPolicy

public interface AssignmentPolicy
Implementations provide a policy for assigning users to Persistent Query replicas.
  • Method Details

    • getOrAssignSlot

      int getOrAssignSlot(@NotNull UserContext user, @NotNull PersistentQueryInfo queryInfo)
      Get the slot assignment, or assign a slot for the specified user and query.
      Parameters:
      user - The user to assign
      queryInfo - 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 configuration
      current - the new configuration
    • afterConfigurationChanged

      void afterConfigurationChanged(@NotNull PersistentQueryConfiguration prev, @NotNull PersistentQueryConfiguration current)
      Notify the policy that the query configuration changed.
      Parameters:
      prev - the old configuration
      current - the new configuration