Class AssignmentPolicyUtil

java.lang.Object
io.deephaven.enterprise.controller.assignment.AssignmentPolicyUtil

public final class AssignmentPolicyUtil extends Object
A Utility class for creating AssignmentPolicy instances from a descriptor.
  • Method Details

    • updateConfiguration

      public static void updateConfiguration(@NotNull Map<String,AssignmentPolicyConfig> newPolicies, @NotNull String defaultPolicyName, @NotNull String defaultPolicyParams)
      Update the configuration values from the parameters. This must be invoked before any other method is called.
      Parameters:
      newPolicies - the map of Policy name to implementation class
      defaultPolicyName - the name of the default policy
      defaultPolicyParams - the default policy parameters, or the empty string.
    • getDefaultPolicyName

      public static String getDefaultPolicyName()
      Get the default policy name.
      Returns:
      the default policy name.
    • getDefaultPolicyParams

      public static String getDefaultPolicyParams()
      Get the default policy parameters.
      Returns:
      the default policy parameters.
    • createPolicy

      public static AssignmentPolicy createPolicy(@Nullable String policyName, @Nullable String assignmentPolicyParams, @NotNull QueryUserAssignmentLogger logger)
      Create an AssignmentPolicy for the policy name.
      Parameters:
      policyName - the name of the policy
      assignmentPolicyParams - the parameters for the policy. May be null.
      logger - the logger to record changes of user assignment.
      Returns:
      a new AssignmentPolicy