protected final void addEndpoint(Endpoint e) {
        final List<Endpoint> newEndpoints;
        endpointsLock.lock();
        try {
            final List<Endpoint> newEndpointsUnsorted = Lists.newArrayList(endpoints);
            newEndpointsUnsorted.add(e);
            endpoints = newEndpoints = ImmutableList.sortedCopyOf(newEndpointsUnsorted);
            logger.info("An endpoint has been added: {}. Current endpoints: {}",
                        toShortString(e), toShortString(newEndpoints));
        } finally {
            endpointsLock.unlock();
        }

        maybeCompleteInitialEndpointsFuture(newEndpoints);
        notifyListeners(newEndpoints);
    }
Adds the specified {@link Endpoint} to current {@link Endpoint} list.
core/src/main/java/com/linecorp/armeria/client/endpoint/DynamicEndpointGroup.java