Package com.mongodb

Examples of com.mongodb.DB$CommandResultPair


    private MicroKernel createMicroKernel() throws Exception {
        MongoConnection connection = new MongoConnection(HOST,
                PORT, DB);
        connections.add(connection);
        DB mongoDB = connection.getDB();
        return new MongoMK.Builder().setMongoDB(mongoDB).open();
    }
View Full Code Here


    @Before
    @Override
    public void setUpConnection() throws Exception {
        super.setUpConnection();
        DB db = mongoConnection.getDB();
        mk2 = new MongoMK.Builder().setMongoDB(db).open();
    }
View Full Code Here

        logger.info("Starting MongoDB MicroKernel with host={}, port={}, db={}",
                new Object[] {host, port, db});

        MongoConnection connection = new MongoConnection(host, port, db);
        DB mongoDB = connection.getDB();

        logger.info("Connected to database {}", mongoDB);

        mk = new MongoMK.Builder().setMongoDB(mongoDB).open();
View Full Code Here

    }
   
    private static MongoMK createMK() {
        MongoMK.Builder builder = new MongoMK.Builder();
        if (MONGO_DB) {
            DB db = MongoUtils.getConnection().getDB();
            MongoUtils.dropCollections(db);
            builder.setMongoDB(db);
        }
        return builder.open();
    }
View Full Code Here

    }

    private static MongoMK createMK() {
        MongoMK.Builder builder = new MongoMK.Builder();
        if (MONGO_DB) {
            DB db = MongoUtils.getConnection().getDB();
            MongoUtils.dropCollections(db);
            builder.setMongoDB(db);
        }
        return builder.open();
    }
View Full Code Here

    @Before
    public void setupMicroKernels() throws Exception {
        mongoConnection2.getDB().dropDatabase();
        // DB1 handled by the AbstractMongoConnectionTest

        DB db = mongoConnection.getDB();
        mk1 = new MongoMK.Builder().setMongoDB(db).open();

        DB db2 = mongoConnection2.getDB();
        mk2 = new MongoMK.Builder().setMongoDB(db2).open();

        DB db3 = mongoConnection3.getDB();
        mk3 = new MongoMK.Builder().setMongoDB(db3).open();
    }
View Full Code Here

   
    private MongoMK createMK(int clusterId) {
        MongoMK.Builder builder = new MongoMK.Builder();
        builder.setAsyncDelay(0);
        if (MONGO_DB) {
            DB db = MongoUtils.getConnection().getDB();
            MongoUtils.dropCollections(db);
            builder.setMongoDB(db);
        } else {
            if (ds == null) {
                ds = new MemoryDocumentStore();
View Full Code Here

    }

    @Override
    public void setUpCluster(MicroKernel[] cluster) throws Exception {
        MongoConnection connection = getMongoConnection();
        DB db = connection.getDB();
        dropCollections(db);

        for (int i = 0; i < cluster.length; i++) {
            cluster[i] = new MongoMK.Builder().
                    setMongoDB(db).setClusterId(i).open();
View Full Code Here

    }

    @Override
    public void tearDownCluster(MicroKernel[] cluster) {
        try {
            DB db = getMongoConnection().getDB();
            dropCollections(db);
            mongoConnection.close();
            mongoConnection = null;
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

    @Before
    @After
    public void clear() {
        if (MONGO_DB) {
            DB db = MongoUtils.getConnection().getDB();
            MongoUtils.dropCollections(db);
        }                   
    }
View Full Code Here

TOP

Related Classes of com.mongodb.DB$CommandResultPair

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.