|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventstore.mongo.MongoTemplate
public class MongoTemplate
Helper class for interacting with the MongoDB instance containing the axon event store data. You can use the helper to get access to the MongoDB database and obtain references to the collection required by axon.
By configuring this object, you can change the name of the database as well as the names of the collections that are used.
| Constructor Summary | |
|---|---|
MongoTemplate(com.mongodb.Mongo mongoDb)
The helper requires an actual Mongo connection provided by the java driver. |
|
| Method Summary | |
|---|---|
com.mongodb.DB |
database()
Returns the database for the axon event store. |
com.mongodb.DBCollection |
domainEventCollection()
Returns a reference to the collection containing the domain events. |
void |
setDatabaseName(String databaseName)
Changes the name of the database where axon events will be stored. |
void |
setDomainEventsCollectionName(String domainEventsCollectionName)
Changes the name of the collection to store the domain events. |
void |
setSnapshotEventsCollectionName(String snapshotEventsCollectionName)
Changes the name of the collection to store the snapshot events in. |
com.mongodb.DBCollection |
snapshotEventCollection()
Returtns a reference to the collection containing the snapshot events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MongoTemplate(com.mongodb.Mongo mongoDb)
Mongo connection provided by the java driver.
mongoDb - The actual connection to a MongoDB instance| Method Detail |
|---|
public com.mongodb.DBCollection domainEventCollection()
public com.mongodb.DBCollection snapshotEventCollection()
public com.mongodb.DB database()
public void setDatabaseName(String databaseName)
databaseName - String containing the name of the database for axon eventspublic void setDomainEventsCollectionName(String domainEventsCollectionName)
domainEventsCollectionName - String containing the name of the collection containing the domain eventspublic void setSnapshotEventsCollectionName(String snapshotEventsCollectionName)
snapshotEventsCollectionName - String containing the name of the collection containing the snapshot events
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||