synchronized CompletableFuture<?> register(String singletonId, SingletonWorker singleton) {
        Validation.requireMatch(singletonId, "Singleton ID", idPattern);
        Validation.requireLength(singletonId, "Singleton ID", 1, 255);
        String old = registrations.putIfAbsent(singleton, singletonId);
        if (old != null) throw new IllegalArgumentException(singleton + " already registered with ID " + old);
        count.merge(singletonId, 1, Integer::sum);
        return janitors.computeIfAbsent(singletonId, Janitor::new).register(singleton);
    }
Manages {@link com.yahoo.vespa.curator.api.VespaCurator.SingletonWorker}.

@author jonmv
zkfacade/src/main/java/com/yahoo/vespa/curator/SingletonManager.java