Package de.flapdoodle.embed.mongo.config

Examples of de.flapdoodle.embed.mongo.config.Net


        MongodStarter starter = MongodStarter.getDefaultInstance();

        int port = 12345;
        IMongodConfig mongodConfig = new MongodConfigBuilder()
            .version(Version.Main.PRODUCTION)
            .net(new Net(port, Network.localhostIsIPv6()))
            .build();

        try {
            mongodExecutable = starter.prepare(mongodConfig);
            MongodProcess mongod = mongodExecutable.start();
View Full Code Here


                port = PortUtils.allocateRandomPort();
            }
            savePortToProjectProperties();

            IMongodConfig config = new MongodConfigBuilder()
                    .version(getVersion()).net(new Net(bindIp, port, Network.localhostIsIPv6()))
                    .replication(new Storage(getDataDirectory(), null, 0))
                    .build();

            executable = MongodStarter.getInstance(runtimeConfig).prepare(config);
        } catch (UnknownHostException e) {
View Full Code Here

    MongodStarter runtime = MongodStarter.getDefaultInstance();

    int port = Network.getFreeServerPort();
    IMongodConfig mongodConfig = new MongodConfigBuilder()
        .version(Version.Main.PRODUCTION)
        .net(new Net(port, Network.localhostIsIPv6())).build();

    // Store Mongo server "host:port" in Hadoop configuration
    // so that MongoStore will be able to get it latter
    conf.set(MongoStore.PROP_MONGO_SERVERS, "127.0.0.1:" + port);
View Full Code Here

    MongodStarter starter = MongodStarter.getDefaultInstance();

    try {
        IMongodConfig mongodConfig = new MongodConfigBuilder()
            .version(Version.Main.V2_4)
            .net(new Net(PORT, Network.localhostIsIPv6()))
            .build();

        MongodExecutable mongodExecutable = starter.prepare(mongodConfig);
        mongod = mongodExecutable.start();
    } catch (IOException e) {
View Full Code Here

            return mock(MongodExecutable.class);
        }

        IMongodConfig mongodConfig = new MongodConfigBuilder()
                .version(Version.Main.PRODUCTION)
                .net(new Net(port, false))
                .build();

        Command command = Command.MongoD;
        IRuntimeConfig runtimeConfig = new RuntimeConfigBuilder()
                .defaults(command)
View Full Code Here

                        .defaults(Command.MongoD)
                        .processOutput(new ProcessOutput(output, output, output))
                        .build();
                IMongodConfig mongodConfig = new MongodConfigBuilder()
                        .version(Version.Main.PRODUCTION)
                        .net(new Net(port, Network.localhostIsIPv6()))
                        .build();

                MongodStarter.getInstance(runtimeConfig).prepare(mongodConfig).start();

                return createClient(port);
View Full Code Here

      @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);
View Full Code Here

TOP

Related Classes of de.flapdoodle.embed.mongo.config.Net

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.