@Test public void add() { registrationCache.add("command2", new DirectCommandHandler(streamObserver1, new ClientStreamIdentification(Topology.DEFAULT_CONTEXT, "client1"), "client1", "component")); assertEquals(2, registrationCache.getAll().get(new DirectCommandHandler(streamObserver1, new ClientStreamIdentification(Topology.DEFAULT_CONTEXT, "client1"), "client1", "component")).size()); }
public void add(String command, CommandHandler commandHandler) { add(command, commandHandler, 100); }
CommandRegistrationCache { public void add(String command, CommandHandler commandHandler) { add(command, commandHandler, 100); } }
CommandRegistrationCache { public void add(String command, CommandHandler commandHandler) { add(command, commandHandler, 100); } @Autowired  CommandRegistrationCache(
            BiFunction<Map<String, MetaDataValue>, Set<ClientStreamIdentification>, Set<ClientStreamIdentification>> metaDataBasedNodeSelector);  CommandRegistrationCache();  CommandRegistrationCache(Function<CommandTypeIdentifier, RoutingSelector<String>> selectorFactory);  CommandRegistrationCache(Function<CommandTypeIdentifier, RoutingSelector<String>> selectorFactory,
                                    BiFunction<Map<String, MetaDataValue>, Set<ClientStreamIdentification>, Set<ClientStreamIdentification>> metaDataBasedNodeSelector); }
CommandRegistrationCache { public void add(String command, CommandHandler commandHandler) { add(command, commandHandler, 100); } @Autowired  CommandRegistrationCache(
            BiFunction<Map<String, MetaDataValue>, Set<ClientStreamIdentification>, Set<ClientStreamIdentification>> metaDataBasedNodeSelector);  CommandRegistrationCache();  CommandRegistrationCache(Function<CommandTypeIdentifier, RoutingSelector<String>> selectorFactory);  CommandRegistrationCache(Function<CommandTypeIdentifier, RoutingSelector<String>> selectorFactory,
                                    BiFunction<Map<String, MetaDataValue>, Set<ClientStreamIdentification>, Set<ClientStreamIdentification>> metaDataBasedNodeSelector); void remove(ClientStreamIdentification client); void remove(ClientStreamIdentification client, String command); void add(String command, CommandHandler commandHandler); Map<CommandHandler, Set<RegistrationEntry>> getAll(); Set<String> getCommandsFor(ClientStreamIdentification clientNode); CommandHandler getHandlerForCommand(String context, Command request, String routingKey); CommandHandler findByClientAndCommand(ClientStreamIdentification clientIdentification, String request); @EventListener void on(SubscribeCommand event); @EventListener void on(UnsubscribeCommand event); }
CommandRegistrationCache { public void add(String command, CommandHandler commandHandler) { add(command, commandHandler, 100); } @Autowired  CommandRegistrationCache(
            BiFunction<Map<String, MetaDataValue>, Set<ClientStreamIdentification>, Set<ClientStreamIdentification>> metaDataBasedNodeSelector);  CommandRegistrationCache();  CommandRegistrationCache(Function<CommandTypeIdentifier, RoutingSelector<String>> selectorFactory);  CommandRegistrationCache(Function<CommandTypeIdentifier, RoutingSelector<String>> selectorFactory,
                                    BiFunction<Map<String, MetaDataValue>, Set<ClientStreamIdentification>, Set<ClientStreamIdentification>> metaDataBasedNodeSelector); void remove(ClientStreamIdentification client); void remove(ClientStreamIdentification client, String command); void add(String command, CommandHandler commandHandler); Map<CommandHandler, Set<RegistrationEntry>> getAll(); Set<String> getCommandsFor(ClientStreamIdentification clientNode); CommandHandler getHandlerForCommand(String context, Command request, String routingKey); CommandHandler findByClientAndCommand(ClientStreamIdentification clientIdentification, String request); @EventListener void on(SubscribeCommand event); @EventListener void on(UnsubscribeCommand event);  }