@Test public void findByExistingClient() { assertNotNull(registrationCache.findByClientAndCommand(new ClientStreamIdentification(Topology.DEFAULT_CONTEXT, "client2"), "command1")); }
public CommandHandler findByClientAndCommand(ClientStreamIdentification clientIdentification, String request) { boolean found = registrationsPerClient.getOrDefault(clientIdentification, emptyMap()).containsKey(request); if (!found) { return null; } return commandHandlersPerClientContext.get(clientIdentification); }
CommandRegistrationCache { public CommandHandler findByClientAndCommand(ClientStreamIdentification clientIdentification, String request) { boolean found = registrationsPerClient.getOrDefault(clientIdentification, emptyMap()).containsKey(request); if (!found) { return null; } return commandHandlersPerClientContext.get(clientIdentification); } }
CommandRegistrationCache { public CommandHandler findByClientAndCommand(ClientStreamIdentification clientIdentification, String request) { boolean found = registrationsPerClient.getOrDefault(clientIdentification, emptyMap()).containsKey(request); if (!found) { return null; } return commandHandlersPerClientContext.get(clientIdentification); } @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 CommandHandler findByClientAndCommand(ClientStreamIdentification clientIdentification, String request) { boolean found = registrationsPerClient.getOrDefault(clientIdentification, emptyMap()).containsKey(request); if (!found) { return null; } return commandHandlersPerClientContext.get(clientIdentification); } @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 CommandHandler findByClientAndCommand(ClientStreamIdentification clientIdentification, String request) { boolean found = registrationsPerClient.getOrDefault(clientIdentification, emptyMap()).containsKey(request); if (!found) { return null; } return commandHandlersPerClientContext.get(clientIdentification); } @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);  }