MCPcopy Create free account
hub / github.com/InterviewReady/Low-Level-Design / register

Method register

LoadBalancer.java:11–13  ·  view source on GitHub ↗
(RequestType requestType, Service service)

Source from the content-addressed store, hash-verified

9 Map<RequestType, Service> serviceMap;
10
11 public void register(RequestType requestType, Service service) {
12 serviceMap.put(requestType, service);
13 }
14
15 Set<Destination> getDestinations(Request request){
16 Service service = serviceMap.get(request.requestType);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected