public class MongoFactory extends Object
Mongo
instance) to a MongoDB cluster. Both explicit
construction with a pre-instantiated MongoDbConfiguration
and via a
MongoDB URI are supported.Modifier and Type | Method and Description |
---|---|
static Mongo |
create(MongoDbConfiguration config)
Creates a new
Mongo instance using the
MongoDbConfiguration . |
static Mongo |
create(MongoDbUri mongoDbUri)
Creates a new
Mongo instance using a MongoDB style URL. |
static Mongo |
create(String mongoDbUri)
Creates a new
Mongo instance using a MongoDB style URL. |
public static Mongo create(MongoDbConfiguration config)
Mongo
instance using the
MongoDbConfiguration
.config
- The configuration for the connection to MongoDB.Mongo
representation of the connections to MongoDB.public static Mongo create(MongoDbUri mongoDbUri)
Mongo
instance using a MongoDB style URL.mongoDbUri
- The configuration for the connection to MongoDB expressed as a
MongoDB URL.Mongo
representation of the connections to MongoDB.public static Mongo create(String mongoDbUri)
Mongo
instance using a MongoDB style URL.mongoDbUri
- The configuration for the connection to MongoDB expressed as a
MongoDB URL.Mongo
representation of the connections to MongoDB.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.