code: protected void setReady(boolean ready) {
          synchronized (SERVICE_AVILABILITY_LOCK) {
              LOG.info("Service {} is now {}", getName(), ready ? "READY" : "NOT READY");
              this.ready = ready;
              checkAvailability();
          }
          runAvailableMethod(); // call outside lock
      }
docs: Sets the readiness of this service. If this service is ready and all its dependencies are available, than this service becomes available.
  @param ready