class Core {

  @Stability.Internal
  public void initGlobalConfig() {
    long start = System.nanoTime();
    configurationProvider
      .loadAndRefreshGlobalConfig()
      .subscribe(
        v -> {},
        throwable -> {
          InitGlobalConfigFailedEvent.Reason reason = InitGlobalConfigFailedEvent.Reason.UNKNOWN;
          if (throwable instanceof UnsupportedConfigMechanismException) {
            reason = InitGlobalConfigFailedEvent.Reason.UNSUPPORTED;
          } else if (throwable instanceof GlobalConfigNotFoundException) {
            reason = InitGlobalConfigFailedEvent.Reason.NO_CONFIG_FOUND;
          } else if (throwable instanceof ConfigException) {
            if (throwable.getCause() instanceof RequestCanceledException) {
              RequestContext ctx = ((RequestCanceledException) throwable.getCause()).context().requestContext();
              if (ctx.request().cancellationReason() == CancellationReason.SHUTDOWN) {
                reason = InitGlobalConfigFailedEvent.Reason.SHUTDOWN;
              }
            }
          }
          eventBus.publish(new InitGlobalConfigFailedEvent(
            reason.severity(),
            Duration.ofNanos(System.nanoTime() - start),
            context(),
            reason,
            throwable
          ));
        }
      );
  }

  protected  Core(final CoreEnvironment environment, final Authenticator authenticator, final Set<SeedNode> seedNodes);

}