本文整理了Java中de.flapdoodle.embed.mongo.MongodExecutable
类的一些代码示例,展示了MongodExecutable
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MongodExecutable
类的具体详情如下:
包路径:de.flapdoodle.embed.mongo.MongodExecutable
类名称:MongodExecutable
暂无
代码示例来源:origin: spring-projects/spring-data-examples
private void initializeConfigServer(IMongodConfig config) throws Exception {
if (!config.isConfigServer()) {
throw new Exception(
"Mongo configuration is not a defined for a config server.");
}
MongodStarter starter = MongodStarter.getDefaultInstance();
MongodExecutable mongodExe = starter.prepare(config);
MongodProcess process = mongodExe.start();
mongodProcessList.add(process);
}
代码示例来源:origin: kaaproject/kaa
public static void tearDown() throws Exception {
mongod.stop();
mongoDBExec.stop();
}
代码示例来源:origin: restx/restx
@Override
public void evaluate() throws Throwable {
MongodExecutable _mongodExe = runtime
.prepare(new MongodConfigBuilder()
.version(mongoVersion)
.net(new Net(Integer.parseInt(mongoClientURI
.getURI().split(":")[2]), false))
.build());
MongodProcess _mongod = _mongodExe.start();
MongoClient mongoClient = new MongoClient(mongoClientURI);
base.evaluate();
mongoClient.close();
_mongod.stop();
_mongodExe.stop();
}
};
代码示例来源:origin: de.flapdoodle.embed/de.flapdoodle.embed.mongo
@Override
protected MongodExecutable newExecutable(IMongodConfig mongodConfig, Distribution distribution, IRuntimeConfig runtime, IExtractedFileSet files) {
return new MongodExecutable(distribution, mongodConfig, runtime, files);
}
}
代码示例来源:origin: stackoverflow.com
MongoDBRuntime runtime = MongoDBRuntime.getDefaultInstance();
mongodExe = runtime.prepare(new MongodConfig(Version.V2_3_0, 12345, Network.localhostIsIPv6()));
mongod = mongodExe.start();
mongo = new Mongo("localhost", 12345);
代码示例来源:origin: com.redhat.lightblue.mongo/lightblue-mongo-test
@Override
protected void after() {
if (mongodExe != null) {
mongodExe.stop();
}
client = null;
mongod = null;
mongodExe = null;
}
代码示例来源:origin: kaaproject/kaa
public static void setUp(int port) throws Exception {
LOG.info("Embedded MongoDB server started on " + port + " port and " + MONGO_HOST + " host.");
MongodStarter runtime = MongodStarter.getDefaultInstance();
mongoDBExec = runtime.prepare(createMongodConfig(port));
mongod = mongoDBExec.start();
mongo = new MongoClient(MONGO_HOST, port);
}
代码示例来源:origin: yandex-qatools/embedded-services
@Override
public void doStop() {
if (executable != null) {
executable.stop();
}
}
代码示例来源:origin: spring-projects/spring-data-examples
MongodStarter starter = MongodStarter.getInstance(runtimeConfig);
MongodExecutable mongodExe = starter.prepare(mongoConfig);
MongodProcess process = mongodExe.start();
mongodProcessList.add(process);
代码示例来源:origin: ru.yandex.qatools.embed/embedded-services
@Override
public void doStop() {
if (executable != null) {
executable.stop();
}
}
代码示例来源:origin: ru.yandex.qatools.embed/embedded-services
private void startMongoProcess() throws IOException {
mongod = executable.start();
if (newDirectory && replSetName != null) {
try {
initiateReplicaSet();
} catch (Exception e) {
logger.error("Failed to initialize replica set", e);
}
}
}
代码示例来源:origin: zscott/MultiBitExchange
public void shutdown() {
if (mongodExecutable != null)
mongodExecutable.stop();
}
代码示例来源:origin: yandex-qatools/embedded-services
private void startMongoProcess() throws IOException {
mongod = executable.start();
if (newDirectory && replSetName != null) {
try {
initiateReplicaSet();
} catch (Exception e) {
logger.error("Failed to initialize replica set", e);
}
}
}
代码示例来源:origin: com.redhat.lightblue.mongo/lightblue-mongo-test
@Override
public void run() {
super.start();
if (mongodExe != null) {
mongodExe.stop();
}
db = null;
client = null;
mongod = null;
mongodExe = null;
}
代码示例来源:origin: eclipse/ditto
public static MongodProcess tryToStartMongoDb(final MongodExecutable mongodExecutable) {
if (mongodExecutable == null) {
return null;
} else {
try {
return mongodExecutable.start();
} catch (final IOException e) {
throw new IllegalStateException("Failed to start MongoDB!", e);
}
}
}
代码示例来源:origin: de.flapdoodle.embed/de.flapdoodle.embed.mongo
/**
* Cleans up the resources created by the utility.
*/
public void shutdown() {
mongodProcess.stop();
mongodExecutable.stop();
}
}
代码示例来源:origin: de.flapdoodle.embed/de.flapdoodle.embed.mongo
private void initializeConfigServer(IMongodConfig config) throws Exception {
if (!config.isConfigServer()) {
throw new Exception(
"Mongo configuration is not a defined for a config server.");
}
MongodStarter starter = MongodStarter.getDefaultInstance();
MongodExecutable mongodExe = starter.prepare(config);
MongodProcess process = mongodExe.start();
mongodProcessList.add(process);
}
代码示例来源:origin: org.pac4j/pac4j-mongo
public void stop() {
if (mongodExecutable != null) {
mongodExecutable.stop();
}
}
}
代码示例来源:origin: sakserv/hadoop-mini-clusters
@Override
public void start() throws Exception {
LOG.info("MONGODB: Starting MongoDB on {}:{}", ip, port);
starter = MongodStarter.getDefaultInstance();
configure();
mongodExe = starter.prepare(conf);
mongod = mongodExe.start();
}
代码示例来源:origin: de.braintags/vertx-key-generator
@Override
public void shutdown(Handler<AsyncResult<Void>> handler) {
if (exe != null) {
exe.stop();
exe = null;
}
super.shutdown(handler);
}
内容来源于网络,如有侵权,请联系作者删除!