code: protected final void addEndpoint(Endpoint e) {
          final List<Endpoint> newEndpoints;
          endpointsLock.lock();
          try {
              List<Endpoint> newEndpointsUnsorted = Lists.newArrayList(endpoints);
              newEndpointsUnsorted.add(e);
              endpoints = newEndpoints = ImmutableList.sortedCopyOf(newEndpointsUnsorted);
          } finally {
              endpointsLock.unlock();
          }
  
          notifyListeners(newEndpoints);
          completeInitialEndpointsFuture(newEndpoints);
      }
docs: Adds the specified {@link Endpoint} to current {@link Endpoint} list.