@Override
    public int compare(final CoprocessorEnvironment env1, final CoprocessorEnvironment env2) {
      if (env1.getPriority() < env2.getPriority()) {
        return -1;
      } else if (env1.getPriority() > env2.getPriority()) {
        return 1;
      }
      if (env1.getLoadSequence() < env2.getLoadSequence()) {
        return -1;
      } else if (env1.getLoadSequence() > env2.getLoadSequence()) {
        return 1;
      }
      return 0;
    }
Environment priority comparator. Coprocessors are chained in sorted order.
hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java