@Test public void numberOfActiveClientsUpdatesAsNewClientsCreated() { assertNumberOfActiveClientsIs(0); assertMaxClientsIs(DEFAULT_MAX_NUMBER_OF_CLIENTS); namespaces.get(uniqueClient()); assertNumberOfActiveClientsIs(1); assertMaxClientsIs(DEFAULT_MAX_NUMBER_OF_CLIENTS); namespaces.get(uniqueClient()); assertNumberOfActiveClientsIs(2); assertMaxClientsIs(DEFAULT_MAX_NUMBER_OF_CLIENTS); }
public TimeLockServices get(String namespace) { return services.computeIfAbsent(namespace, this::createNewClient); }
TimelockNamespaces { public TimeLockServices get(String namespace) { return services.computeIfAbsent(namespace, this::createNewClient); } }
TimelockNamespaces { public TimeLockServices get(String namespace) { return services.computeIfAbsent(namespace, this::createNewClient); } TimelockNamespaces(
            MetricsManager metrics,
            Function<String, TimeLockServices> factory,
            Supplier<Integer> maxNumberOfClients); }
TimelockNamespaces { public TimeLockServices get(String namespace) { return services.computeIfAbsent(namespace, this::createNewClient); } TimelockNamespaces(
            MetricsManager metrics,
            Function<String, TimeLockServices> factory,
            Supplier<Integer> maxNumberOfClients); TimeLockServices get(String namespace); Set<Client> getActiveClients(); int getNumberOfActiveClients(); int getMaxNumberOfClients(); }
TimelockNamespaces { public TimeLockServices get(String namespace) { return services.computeIfAbsent(namespace, this::createNewClient); } TimelockNamespaces(
            MetricsManager metrics,
            Function<String, TimeLockServices> factory,
            Supplier<Integer> maxNumberOfClients); TimeLockServices get(String namespace); Set<Client> getActiveClients(); int getNumberOfActiveClients(); int getMaxNumberOfClients();  }