CQRS.NET  4.0
A lightweight enterprise Function as a Service (FaaS) framework to write function based serverless and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.
Cqrs.MongoDB.Events.MongoDbSnapshotStore Class Reference

Stores the most recent snapshots for replay and IAggregateRoot<TAuthenticationToken> rehydration on a SnapshotAggregateRoot<TAuthenticationToken,TSnapshot> in MongoDB. More...

+ Inheritance diagram for Cqrs.MongoDB.Events.MongoDbSnapshotStore:

Public Member Functions

 MongoDbSnapshotStore (IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ILogger logger, ICorrelationIdHelper correlationIdHelper, ISnapshotBuilder snapshotBuilder, IMongoDbSnapshotStoreConnectionStringFactory mongoDbSnapshotStoreConnectionStringFactory)
 Instantiate a new instance of MongoDbEventStore<TAuthenticationToken> triggering any require index checks. More...
 
override void Save (Snapshot snapshot)
 Saves the provided snapshot into storage. More...
 
- Public Member Functions inherited from Cqrs.Snapshots.SnapshotStore
virtual Snapshot Get< TAggregateRoot > (Guid id)
 Get the latest Snapshot from storage. More...
 
Snapshot Get (Type aggregateRootType, Guid id)
 Get the latest Snapshot from storage. More...
 

Protected Member Functions

virtual IMongoCollection< MongoDbEventDataGetCollection ()
 Get a IMongoCollection<TDocument> More...
 
virtual void VerifyIndexes ()
 Verify all required MongoDbIndex<TEntity> are defined and ready to go. More...
 
virtual void VerifyIndex (MongoDbIndex< MongoDbEventData > mongoIndex)
 Verify the provided mongoIndex is defined and ready to go. More...
 
override Snapshot Get (Type aggregateRootType, string streamName)
 Get the latest Snapshot from storage. More...
 
- Protected Member Functions inherited from Cqrs.Snapshots.SnapshotStore
 SnapshotStore (IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ISnapshotBuilder snapshotBuilder, ILogger logger, ICorrelationIdHelper correlationIdHelper)
 Instantiate a new instance of the SnapshotStore class. More...
 
virtual string GenerateStreamName (Type aggregateRootType, Guid aggregateId)
 Generate a unique stream name based on the provided aggregateRootType and the aggregateId . More...
 
virtual EventData BuildEventData (Snapshot snapshot)
 Builds the EventData from the snapshot . More...
 

Properties

IMongoCollection< MongoDbEventDataMongoCollection [get]
 Gets or sets the IMongoCollection<TData> More...
 
IMongoDbSnapshotStoreConnectionStringFactory MongoDbSnapshotStoreConnectionStringFactory [get]
 Gets or sets the IMongoDbEventStoreConnectionStringFactory More...
 
- Properties inherited from Cqrs.Snapshots.SnapshotStore
IConfigurationManager ConfigurationManager [get]
 Gets or sets the IConfigurationManager More...
 
ISnapshotDeserialiser EventDeserialiser [get]
 The ISnapshotDeserialiser used to deserialise snapshots. More...
 
ISnapshotBuilder SnapshotBuilder [get]
 The ISnapshotBuilder used to build snapshots. More...
 
ILogger Logger [get]
 The ILogger to use. More...
 
ICorrelationIdHelper CorrelationIdHelper [get]
 The ICorrelationIdHelper to use. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from Cqrs.Snapshots.SnapshotStore
const string CqrsSnapshotStoreStreamNamePattern = "{0}/{1}"
 The pattern used to generate the stream name. More...
 

Detailed Description

Stores the most recent snapshots for replay and IAggregateRoot<TAuthenticationToken> rehydration on a SnapshotAggregateRoot<TAuthenticationToken,TSnapshot> in MongoDB.