LoadBalance load = (LoadBalance) this;
if (load.getRef() != null) {
return "custom " + Strings.getOrElse(load.getRef());
} else if (load.getLoadBalancerType() != null) {
if (load.getLoadBalancerType().getClass().isAssignableFrom(CustomLoadBalancerDefinition.class)) {
CustomLoadBalancerDefinition custom = (CustomLoadBalancerDefinition) load.getLoadBalancerType();
return "custom " + Strings.getOrElse(custom.getRef());
} else if (load.getLoadBalancerType().getClass().isAssignableFrom(FailoverLoadBalancerDefinition.class)) {
return "failover";
} else if (load.getLoadBalancerType().getClass().isAssignableFrom(RandomLoadBalancerDefinition.class)) {
return "random";
} else if (load.getLoadBalancerType().getClass().isAssignableFrom(RoundRobinLoadBalancerDefinition.class)) {