public static class Mongo.Holder
extends java.lang.Object
| Constructor and Description |
|---|
Mongo.Holder() |
| Modifier and Type | Method and Description |
|---|---|
Mongo |
connect(MongoURI uri)
Attempts to find an existing Mongo instance matching that URI in the holder, and returns it if exists.
|
static Mongo.Holder |
singleton() |
public Mongo connect(MongoURI uri) throws java.net.UnknownHostException
uri - the Mongo URIMongoExceptionjava.net.UnknownHostExceptionpublic static Mongo.Holder singleton()