Package de.flapdoodle.embed.mongo.config

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


        executor = Executors.newSingleThreadExecutor();

        MongodStarter starter = MongodStarter.getDefaultInstance();

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

        try {
View Full Code Here


            if (randomPort) {
                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);
View Full Code Here

  public void setUpClass() throws Exception {
    super.setUpClass();
    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
View Full Code Here

  public static void startDb() {
    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);
View Full Code Here

            logger.info("Port 27017 is taken. Assuming MongoDB is running");
            // returning a mock, so we can call close on it, which is ignored
            return mock(MongodExecutable.class);
        }

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

        Command command = Command.MongoD;
View Full Code Here

                IRuntimeConfig runtimeConfig = new RuntimeConfigBuilder()
                        .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();
View Full Code Here

TOP

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

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.