| 102 | } |
| 103 | |
| 104 | class LoadBalancerFactory { |
| 105 | public LoadBalancer createLoadBalancer(String lbType) { |
| 106 | return switch (lbType) { |
| 107 | case "round-robin" -> new RoundRobinLoadBalancer(); |
| 108 | case "least-connection" -> new LeastConnectionLoadBalancer(); |
| 109 | default -> new LeastConnectionLoadBalancer(); |
| 110 | }; |
| 111 | } |
| 112 | } |
nothing calls this directly
no outgoing calls
no test coverage detected