@SuppressWarnings("GuardedBy")
    private <T extends Future<U>, U> T add(T future) {
        scheduledFutures.put(future, Boolean.TRUE);
        future.addListener(f -> {
            lock.lock();
            try {
                scheduledFutures.remove(f);
            } finally {
                lock.unlock();
            }
        });
        return future;
    }
Keeps the {@link Future}s which were scheduled via this {@link ScheduledExecutorService}.
Note that this field is also used as a lock.
core/src/main/java/com/linecorp/armeria/client/endpoint/healthcheck/DefaultHealthCheckerContext.java