public class DefaultMongoTemplate extends AuthenticatingMongoTemplate implements MongoTemplate
| Constructor and Description |
|---|
DefaultMongoTemplate(com.mongodb.Mongo mongo)
Initialize a template for the given
mongoDb instance, using default database name ("axonframework")
and collection name ("sagas"). |
DefaultMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String sagasCollectionName,
String userName,
char[] password)
Creates a template connecting to given
mongo instance, and loads sagas in the collection with given
sagasCollectionName, in a database with given databaseName. |
| Modifier and Type | Method and Description |
|---|---|
com.mongodb.DBCollection |
sagaCollection()
Returns a reference to the collection containing the saga instances.
|
databasepublic DefaultMongoTemplate(com.mongodb.Mongo mongo)
mongoDb instance, using default database name ("axonframework")
and collection name ("sagas").mongo - The Mongo instance providing access to the databasepublic DefaultMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String sagasCollectionName,
String userName,
char[] password)
mongo instance, and loads sagas in the collection with given
sagasCollectionName, in a database with given databaseName. When not
null, the given userName and password are used to authenticate against
the database.mongo - The Mongo instance configured to connect to the Mongo ServerdatabaseName - The name of the database containing the datasagasCollectionName - The collection containing the saga instanceuserName - The username to authenticate with. Use null to skip authenticationpassword - The password to authenticate with. Use null to skip authenticationpublic com.mongodb.DBCollection sagaCollection()
MongoTemplatesagaCollection in interface MongoTemplateCopyright © 2010-2014. All Rights Reserved.