|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.common.mongo.AuthenticatingMongoTemplate
org.axonframework.eventstore.mongo.DefaultMongoTemplate
public class DefaultMongoTemplate
Default implementation for the MongoTemplate. This implementation requires access to the configured Mongo object. You can influence the names of the collections used to store the events as well as the
snapshot events.
| Constructor Summary | |
|---|---|
DefaultMongoTemplate(com.mongodb.Mongo mongo)
Initializes the MongoTemplate using the given mongoDb for database access, using default database
and collection names. |
|
DefaultMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String domainEventsCollectionName,
String snapshotEventsCollectionName,
String userName,
char[] password)
Creates a template connecting to given mongo instance, and loads events in the collection with
given domainEventsCollectionName and snapshot events from snapshotEventsCollectionName,
in a database with given databaseName. |
|
DefaultMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String domainEventsCollectionName,
String snapshotEventsCollectionName,
String authenticationDatabase,
String userName,
char[] password)
Creates a template connecting to given mongo instance, and loads events in the collection with
given domainEventsCollectionName and snapshot events from snapshotEventsCollectionName,
in a database with given databaseName. |
|
| Method Summary | |
|---|---|
com.mongodb.DBCollection |
domainEventCollection()
Returns a reference to the collection containing the domain events. |
com.mongodb.DBCollection |
snapshotEventCollection()
Returns a reference to the collection containing the snapshot events. |
| Methods inherited from class org.axonframework.common.mongo.AuthenticatingMongoTemplate |
|---|
database |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMongoTemplate(com.mongodb.Mongo mongo)
mongoDb for database access, using default database
and collection names.
Database name: DefaultMongoTemplate(com.mongodb.Mongo, String, String, String, String, char[]) to
provide different names for database and/or collections.
mongo - The actual connection to a MongoDB instance
public DefaultMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String domainEventsCollectionName,
String snapshotEventsCollectionName,
String userName,
char[] password)
mongo instance, and loads events in the collection with
given domainEventsCollectionName and snapshot events from snapshotEventsCollectionName,
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 datadomainEventsCollectionName - The name of the collection containing domain eventssnapshotEventsCollectionName - The name of the collection containing snapshot eventsuserName - The username to authenticate with. Use null to skip
authenticationpassword - The password to authenticate with. Use null to skip
authentication
public DefaultMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String domainEventsCollectionName,
String snapshotEventsCollectionName,
String authenticationDatabase,
String userName,
char[] password)
mongo instance, and loads events in the collection with
given domainEventsCollectionName and snapshot events from snapshotEventsCollectionName,
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 datadomainEventsCollectionName - The name of the collection containing domain eventssnapshotEventsCollectionName - The name of the collection containing snapshot eventsauthenticationDatabase - The name of the database to authenticate touserName - The username to authenticate with. Use null to skip
authenticationpassword - The password to authenticate with. Use null to skip
authentication| Method Detail |
|---|
public com.mongodb.DBCollection domainEventCollection()
domainEventCollection in interface MongoTemplatepublic com.mongodb.DBCollection snapshotEventCollection()
snapshotEventCollection in interface MongoTemplate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||