code: private CachedProviderServiceInstance getCachedServiceInstance(
              String serviceName, String providerId) {
          try {
              read.lock();
              ServiceInstanceId id = new ServiceInstanceId(serviceName, providerId);
              return getCacheServiceInstances().get(id);
          } finally {
              read.unlock();
          }
      }
docs: Get the Cached ProvidedServiceInstance by serviceName and providerId.
  
  It is thread safe.
  
  @param serviceName
  the serviceName
  @param providerId
  the providerId
  @return
  the CachedProviderServiceInstance