de.flapdoodle.embed.mongo.MongodProcess.getConfig()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(52)

本文整理了Java中de.flapdoodle.embed.mongo.MongodProcess.getConfig()方法的一些代码示例,展示了MongodProcess.getConfig()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MongodProcess.getConfig()方法的具体详情如下:
包路径:de.flapdoodle.embed.mongo.MongodProcess
类名称:MongodProcess
方法名:getConfig

MongodProcess.getConfig介绍

暂无

代码示例

代码示例来源:origin: org.apache.rya/mongodb.rya

/**
 * @return The process configuration.
 *
 */
public IMongodConfig getMongoServerDetails() {
  return mongodProcess.getConfig();
}

代码示例来源:origin: apache/incubator-rya

/**
 * @return The process configuration.
 */
public IMongodConfig getMongoServerDetails() {
  return mongodProcess.getConfig();
}

代码示例来源:origin: apache/incubator-rya

/**
 * @return A new Mongo client that is connected to the embedded MongoDB Server.
 * @throws UnknownHostException The hostname used was unknown.
 * @throws MongoException Couldn't create the client.
 */
public MongoClient newMongoClient() throws UnknownHostException, MongoException {
  return new MongoClient(new ServerAddress(mongodProcess.getConfig().net().getServerAddress(), mongodProcess.getConfig().net().getPort()));
}

代码示例来源:origin: org.apache.rya/mongodb.rya

/**
 * @return A new Mongo client that is connected to the embedded MongoDB Server.
 * @throws UnknownHostException The hostname used was unknown.
 * @throws MongoException Couldn't create the client.
 */
public MongoClient newMongoClient() throws UnknownHostException, MongoException {
  return new MongoClient(new ServerAddress(mongodProcess.getConfig().net().getServerAddress(), mongodProcess.getConfig().net().getPort()));
}

代码示例来源:origin: de.flapdoodle.embed/de.flapdoodle.embed.mongo

/**
 * Creates a new Mongo connection.
 * 
 */
public MongoClient newMongo() throws UnknownHostException {
  return new MongoClient(new ServerAddress(mongodProcess.getConfig().net().getServerAddress(),
      mongodProcess.getConfig().net().getPort()));
}

代码示例来源:origin: zscott/MultiBitExchange

public Mongo newMongo() throws UnknownHostException, MongoException {
 return new Mongo(new ServerAddress(
     mongodProcess.getConfig().net().getServerAddress(),
     mongodProcess.getConfig().net().getPort()));
}

代码示例来源:origin: de.flapdoodle.embed/de.flapdoodle.embed.mongo

@Override
protected List<String> getCommandLine(Distribution distribution, IMongodConfig config, IExtractedFileSet files) throws IOException {
  return Mongod.enhanceCommandLinePlattformSpecific(distribution, Mongod.getCommandLine(getConfig(), files, dbDir));
}

代码示例来源:origin: eclipse/ditto

/**
 * @return the port on which the db listens.
 */
public int getPort() {
  return mongodProcess.getConfig().net().getPort();
}

代码示例来源:origin: eclipse/ditto

/**
 * @return the IP on which the db was bound.
 */
public String getBindIp() {
  return mongodProcess.getConfig().net().getBindIp();
}

代码示例来源:origin: de.flapdoodle.embed/de.flapdoodle.embed.mongo

@Override
protected void onBeforeProcess(IRuntimeConfig runtimeConfig) throws IOException {
  super.onBeforeProcess(runtimeConfig);
  IMongodConfig config = getConfig();
  File tmpDbDir;
  if (config.replication().getDatabaseDir() != null) {
    tmpDbDir = Files.createOrCheckDir(config.replication().getDatabaseDir());
  } else {
    tmpDbDir = Files.createTempDir(PropertyOrPlatformTempDir.defaultInstance(),"embedmongo-db");
    dbDirIsTemp = true;
  }
  this.dbDir = tmpDbDir;
}

代码示例来源:origin: stackoverflow.com

Net net = mongodProcess.getConfig().net();
properties.setHost(net.getServerAddress().getHostName());
properties.setPort(net.getPort());

相关文章

微信公众号

最新文章

更多