code: public Engine build() {
      if (_taskExecutor == null) {
        throw new IllegalStateException("Task executor is required to create an Engine, but it is not set");
      }
      if (_timerScheduler == null) {
        throw new IllegalStateException("Timer scheduler is required to create an Engine, but it is not set");
      }
  
      return new Engine(_taskExecutor, new IndirectDelayedExecutor(_timerScheduler),
          _loggerFactory != null ? _loggerFactory : new CachedLoggerFactory(LoggerFactory.getILoggerFactory()),
          _properties, _planDeactivationListener != null ? _planDeactivationListener : planContext -> {},
          _planCompletionListener != null ? _planCompletionListener : planContext -> {},
          _taskQueueFactory, _planClassRateLimiter);
    }
docs: Checks that the require configuration has been set and then constructs
  and returns a new {@link Engine}.
  
  @return a new {@link Engine} using the configuration in this builder.
  @throws IllegalStateException if the configuration in this builder is invalid.