private static Configuration configure(Configuration conf, boolean enabled, long priority) {
    // create the configuration to actually be stored
    // clone if possible, but otherwise just create an empty configuration
    Configuration toWrite = conf == null ? new Configuration() : new Configuration(conf);

    // update internal properties
    toWrite.setBooleanIfUnset(ENABLED_KEY, enabled);

    // set if unset long
    if (toWrite.getLong(PRIORITY_KEY, UNSET_PRIORITY) == UNSET_PRIORITY) {
      toWrite.setLong(PRIORITY_KEY, priority);
    }

    return toWrite;
  }
Setup the configuration for a constraint as to whether it is enabled and its priority
@param conf     on which to base the new configuration
@param enabled  <tt>true</tt> if it should be run
@param priority relative to other constraints
@return a new configuration, storable in the {@link TableDescriptor}
hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraints.java