});
LOG.debug("role {} starts with a configured prefix {}", role, prefix);
ClusterActionHandlerFactory factory = factoryMap.get(prefix);
checkArgument(factory != null, "could not create action handler factory %s", prefix);
String subrole = role.substring(prefix.length());
ClusterActionHandler returnVal = factory.create(subrole);
checkArgument(returnVal != null, "action handler factory %s could not create action handler for role %s",
prefix, subrole);
return returnVal;
} catch (NoSuchElementException e) {
LOG.debug("role {} didn't start with any of the configured prefixes {}", role, prefixes);