Constructor and Description |
---|
Holder() |
Modifier and Type | Method and Description |
---|---|
Mongo |
connect(MongoClientURI uri)
Attempts to find an existing MongoClient instance matching that URI in the holder, and returns it if exists.
|
Mongo |
connect(MongoURI uri)
Deprecated.
Please use
connect(MongoClientURI) instead. |
static Mongo.Holder |
singleton() |
@Deprecated public Mongo connect(MongoURI uri) throws UnknownHostException
connect(MongoClientURI)
instead.uri
- the Mongo URIMongoException
UnknownHostException
public Mongo connect(MongoClientURI uri) throws UnknownHostException
uri
- the Mongo URIMongoException
UnknownHostException
public static Mongo.Holder singleton()