code: protected void checkServiceState() {
          State dbServiceState = DBManagerService.instance().getState();
          if (!dbServiceState.isInitialized()) {
              throw new RuntimeException("DBService has not been initialized");
          }
          if (!dbServiceState.isRunning()) {
              throw new DBNotAvailableException("Initial Cassandra connection hasn't been established");
          }
          waitForFullService();
      }
docs: This method is the same as {@link #waitForFullService()} except that it
  additionally ensures the the {@link DBService} is running and throws a
  {@link DBNotAvailableException} if it isn't. This can be used by public service
  methods to throw immediately when the DBService hasn't been initialized, thereby
  returning a 503 to the caller. But if the DBService is running and this service
  is still starting-up, it waits until it reaches running state.
  
  @throws DBNotAvailableException   If the DBService is not yet running.