|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mongodb.Mongo.Holder
public static class Mongo.Holder
Mongo.Holder can be used as a static place to hold several instances of Mongo. Security is not enforced at this level, and needs to be done on the application side.
| Constructor Summary | |
|---|---|
Mongo.Holder()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mongo.Holder()
| Method Detail |
|---|
public Mongo connect(MongoURI uri)
throws MongoException,
java.net.UnknownHostException
uri - the Mongo URI
MongoException
java.net.UnknownHostExceptionpublic static Mongo.Holder singleton()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||