release-9.2.0: Adds Hystrix SetterFactory to customize group and command keys (#447)

adriancole
2016-08-17T14:52:28Z

This exposes means to customize group and command keys, for example to
use non-default conventions from configuration or custom annotation
processing.

Ex.

SetterFactory commandKeyIsRequestLine = (target, method) -> {
  String groupKey = target.name();
  String commandKey = method.getAnnotation(RequestLine.class).value();
  return HystrixCommand.Setter
      .withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupKey))
      .andCommandKey(HystrixCommandKey.Factory.asKey(commandKey));
};

api = HystrixFeign.builder()
                  .setterFactory(commandKeyIsRequestLine)
                  ...

This also makes the default's more unique to avoid clashing in Hystrix's
cache.