private void initializeServices() {
    ServiceLoader<CacheService> loader = ServiceLoader.load(CacheService.class);
    for (CacheService service : loader) {
      try {
        if (service.init(this)) {
          services.put(service.getInterface(), service);
          logger.info("Initialized cache service {}", service.getClass().getName());
        }
      } catch (Exception ex) {
        logger.warn("Cache service " + service.getClass().getName() + " failed to initialize", ex);
        throw ex;
      }
    }
  }
Initialize any services provided as extensions to the cache using service loader.
geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java