core/src/main/java/com/orientechnologies/orient/core/Orient.java
public OEngine getRunningEngine(final String engineName) {
    engineLock.readLock().lock();
    try {
      OEngine engine = engines.get(engineName);
      if (engine == null)
        throw new IllegalStateException("Engine '" + engineName + "' is not found.");

      if (!engine.isRunning() && !startEngine(engine))
        throw new IllegalStateException("Engine '" + engineName + "' is failed to start.");

      return engine;
    } finally {
      engineLock.readLock().unlock();
    }
  }
public OEngine getRunningEngine(final String engineName) {
    engineLock.readLock().lock();
    try {
      OEngine engine = engines.get(engineName);
      if (engine == null)
        throw new IllegalStateException("Engine '" + engineName + "' is not found.");

      if (!engine.isRunning() && !startEngine(engine))
        throw new IllegalStateException("Engine '" + engineName + "' is failed to start.");

      return engine;
    } finally {
      engineLock.readLock().unlock();
    }
  }
Obtains a {@link OEngine#isRunning() running} {@link OEngine engine} instance with the given {@code engineName}. If engine is
not running, starts it.

@param engineName the name of the engine to obtain.

@return the obtained running engine instance, never {@code null}.

@throws IllegalStateException if an engine with the given is not found or failed to start.