private EndpointSelector maybeCreateSelector() {
        final EndpointSelector selector = this.selector.get();
        if (selector != null) {
            return selector;
        }

        final EndpointSelector newSelector = selectionStrategy.newSelector(this);
        if (this.selector.compareAndSet(null, newSelector)) {
            return newSelector;
        }

        final EndpointSelector oldSelector = this.selector.get();
        assert oldSelector != null;
        return oldSelector;
    }
Creates an {@link EndpointSelector} lazily, so that the {@link EndpointSelector} is created after
the subclasses' constructor finishes its job.
core/src/main/java/com/linecorp/armeria/client/endpoint/DynamicEndpointGroup.java