Examples of slaveOk()


Examples of com.mongodb.DBCollection.slaveOk()

        DBCollection dbColl = db.getCollection(MongoDBUtils.getCollectionName(cmd));
        Object val = (options != null ? options.get("slave-ok") : Boolean.FALSE);
        if (val == Boolean.TRUE)
        {
            dbColl.slaveOk();
        }
        DBCursor curs = dbColl.find(query, fieldsSelection);
        try
        {
            if (cmd.getIdentityType() == IdentityType.APPLICATION)
View Full Code Here

Examples of com.mongodb.Mongo.slaveOk()

    Mongo mongo = new Mongo(parts[0], port);

    // figure out if we can read from this server

    // allow reading from secondaries
    mongo.slaveOk();

    String database = conf.get("mongo.input.database");
    String collection = conf.get("mongo.input.collection");
    String query = conf.get("mongo.input.query", "");
    String select = conf.get("mongo.input.select","");
View Full Code Here

Examples of com.mongodb.Mongo.slaveOk()

    Mongo mongo = new Mongo(parts[0], port);

    // figure out if we can read from this server

    // allow reading from secondaries
    mongo.slaveOk();

    String database = conf.get("mongo.input.database");
    String collection = conf.get("mongo.input.collection");
    String query = conf.get("mongo.input.query", "");
    String select = conf.get("mongo.input.select","");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.