distributed/src/main/java/com/orientechnologies/orient/server/distributed/impl/ODistributedMessageServiceImpl.java
public ODistributedDatabaseImpl registerDatabase(final String iDatabaseName, ODistributedConfiguration cfg) {
    final ODistributedDatabaseImpl ddb = databases.get(iDatabaseName);
    if (ddb != null)
      return ddb;

    return new ODistributedDatabaseImpl(manager, this, iDatabaseName, cfg, manager.getServerInstance());
  }
public ODistributedDatabaseImpl registerDatabase(final String iDatabaseName, ODistributedConfiguration cfg) {
    final ODistributedDatabaseImpl ddb = databases.get(iDatabaseName);
    if (ddb != null)
      return ddb;

    return new ODistributedDatabaseImpl(manager, this, iDatabaseName, cfg, manager.getServerInstance());
  }
Creates a distributed database instance if not defined yet.