public static class Mongo.Holder
extends java.lang.Object
Constructor and Description |
---|
Mongo.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 java.net.UnknownHostException
connect(MongoClientURI)
instead.uri
- the Mongo URIMongoException
java.net.UnknownHostException
public Mongo connect(MongoClientURI uri) throws java.net.UnknownHostException
uri
- the Mongo URIMongoException
java.net.UnknownHostException
public static Mongo.Holder singleton()