code: @Override
      public ServiceHandle<S> checkOut(ServiceEndPoint endPoint) throws Exception {
          checkNotNull(endPoint);
          checkState(!_isClosed, "cache is closed");
          ServiceHandle<S> serviceHandle = _instancesPerEndpoint.get(endPoint);
          if (serviceHandle == null) {
              // This is the non-ideal state, as we now have to call a synchronized
              // method to create the ServiceHandle and update the copy-on-write map.
              //
              // Note this can/will happen when new Endpoints are discovered due to the
              // inherent race conditions in ServicePool and HostDiscovery.
              return doRegister(endPoint);
          }
  
          // Note we are not checking if the serviceHandle has been flagged for Eviction, as
          //  there are race conditions between checkOut() and ServiceCache.evict().
          return serviceHandle;
      }
docs: Given an ServiceEndpoint return a ServiceHandle.
  <p/>
  If a ServiceHandle does not exist for the given ServiceEndpoint, this method will
  synchronously create one and return it.
  
  @param endPoint The end point to retrieve the instance of service handle for
  @return the service handle
  @throws IllegalStateException if the cache is closed
  @throws NullPointerException  if endPoint is null