Package com.massivecraft.mcore.xlib.mongodb

Examples of com.massivecraft.mcore.xlib.mongodb.DB


  // -------------------------------------------- //
 
  @Override
  public Db getDb(String uri)
  {
    DB db = this.getDbInner(uri);
    return new DbMongo(this, db);
  }
View Full Code Here


    try
    {
      // TODO: Create one of these per collection? Really? Perhaps I should cache.
      MongoClient mongoClient = new MongoClient(muri);
     
      DB db = mongoClient.getDB(muri.getDatabase());
     
      if (muri.getUsername() == null) return db;
     
      if ( ! db.authenticate(muri.getUsername(), muri.getPassword()))
      {
        //log(Level.SEVERE, "... db authentication failed.");
        return null;
      }
      return db;
View Full Code Here

TOP

Related Classes of com.massivecraft.mcore.xlib.mongodb.DB

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.