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.Akka.Domain.AkkaAggregateRepository< TAuthenticationToken > Class Template Reference

A AggregateRepository<TAuthenticationToken> that is safe to use within Akka.NET More...

+ Inheritance diagram for Cqrs.Akka.Domain.AkkaAggregateRepository< TAuthenticationToken >:

Public Member Functions

 AkkaAggregateRepository (IAggregateFactory aggregateFactory, IEventStore< TAuthenticationToken > eventStore, IEventPublisher< TAuthenticationToken > publisher, ICorrelationIdHelper correlationIdHelper, IConfigurationManager configurationManager, IAkkaEventPublisherProxy< TAuthenticationToken > eventPublisher)
 Instantiates a new instance of AkkaAggregateRepository<TAuthenticationToken> More...
 
- Public Member Functions inherited from Cqrs.Domain.AggregateRepository< TAuthenticationToken >
 AggregateRepository (IAggregateFactory aggregateFactory, IEventStore< TAuthenticationToken > eventStore, IEventPublisher< TAuthenticationToken > publisher, ICorrelationIdHelper correlationIdHelper, IConfigurationManager configurationManager)
 Instantiates a new instance of AggregateRepository<TAuthenticationToken> More...
 
virtual void Save< TAggregateRoot > (TAggregateRoot aggregate, int? expectedVersion=null)
 Save and persist the provided aggregate , optionally providing the version number the IAggregateRoot<TAuthenticationToken> is expected to be at. More...
 
virtual TAggregateRoot Get< TAggregateRoot > (Guid aggregateId, IList< IEvent< TAuthenticationToken >> events=null)
 Retrieves an IAggregateRoot<TAuthenticationToken> of type TAggregateRoot . More...
 
virtual TAggregateRoot GetToVersion< TAggregateRoot > (Guid aggregateId, int version, IList< IEvent< TAuthenticationToken >> events=null)
 Retrieves an IAggregateRoot<TAuthenticationToken> of type TAggregateRoot up to and including the provided version . More...
 
virtual TAggregateRoot GetToDate< TAggregateRoot > (Guid aggregateId, DateTime versionedDate, IList< IEvent< TAuthenticationToken >> events=null)
 Retrieves an IAggregateRoot<TAuthenticationToken> of type TAggregateRoot up to and including the provided versionedDate . More...
 
virtual void LoadAggregateHistory< TAggregateRoot > (TAggregateRoot aggregate, IList< IEvent< TAuthenticationToken >> events=null, bool throwExceptionOnNoEvents=true)
 If events is null, loads the events from EventStore, checks for duplicates and then rehydrates the aggregate with the events. More...
 
virtual void LoadAggregateHistoryToVersion< TAggregateRoot > (TAggregateRoot aggregate, int version, IList< IEvent< TAuthenticationToken >> events=null, bool throwExceptionOnNoEvents=true)
 If events is null, loads the events from EventStore, checks for duplicates and then rehydrates the aggregate with the events. More...
 
virtual void LoadAggregateHistoryToDate< TAggregateRoot > (TAggregateRoot aggregate, DateTime versionedDate, IList< IEvent< TAuthenticationToken >> events=null, bool throwExceptionOnNoEvents=true)
 If events is null, loads the events from EventStore, checks for duplicates and then rehydrates the aggregate with the events. More...
 
- Public Member Functions inherited from Cqrs.Akka.Domain.IAkkaAggregateRepository< TAuthenticationToken >
void LoadAggregateHistory< TAggregateRoot > (TAggregateRoot aggregate, IList< IEvent< TAuthenticationToken >> events=null, bool throwExceptionOnNoEvents=true)
 If events is null, loads the events from IEventStore<TAuthenticationToken>, checks for duplicates and then rehydrates the aggregate with the events. More...
 

Protected Member Functions

override TAggregateRoot CreateAggregate< TAggregateRoot > (Guid id)
 Calls IAggregateFactory.Create to get a, TAggregateRoot . More...
 
override void PublishEvent (IEvent< TAuthenticationToken > @event)
 Publish the saved event asynchronously on EventPublisher, then calls AggregateRepository<TAuthenticationToken>.PublishEvent More...
 
- Protected Member Functions inherited from Cqrs.Domain.AggregateRepository< TAuthenticationToken >
virtual TAggregateRoot LoadAggregate< TAggregateRoot > (Guid id, IList< IEvent< TAuthenticationToken >> events=null)
 Calls IAggregateFactory.Create to get a, TAggregateRoot and then calls LoadAggregateHistory<TAggregateRoot>. More...
 
virtual TAggregateRoot LoadAggregateToVersion< TAggregateRoot > (Guid id, int version, IList< IEvent< TAuthenticationToken >> events=null)
 Calls IAggregateFactory.Create to get a, TAggregateRoot and then calls LoadAggregateHistory<TAggregateRoot>. More...
 
virtual TAggregateRoot LoadAggregateToDate< TAggregateRoot > (Guid id, DateTime versionedDate, IList< IEvent< TAuthenticationToken >> events=null)
 Calls IAggregateFactory.Create to get a, TAggregateRoot and then calls LoadAggregateHistory<TAggregateRoot>. More...
 

Properties

IAkkaEventPublisherProxy< TAuthenticationToken > EventPublisher [get]
 Gets the IAkkaEventPublisherProxy<TAuthenticationToken> More...
 
- Properties inherited from Cqrs.Domain.AggregateRepository< TAuthenticationToken >
IEventStore< TAuthenticationToken > EventStore [get]
 Gets or sets the IEventStore<TAuthenticationToken> used to store and retrieve events from. More...
 
IEventPublisher< TAuthenticationToken > Publisher [get]
 Gets or sets the Publisher used to publish events on once saved into the EventStore. More...
 
IAggregateFactory AggregateFactory [get]
 Gets or set the IAggregateFactory. More...
 
ICorrelationIdHelper CorrelationIdHelper [get]
 Gets or set the ICorrelationIdHelper. More...
 
IConfigurationManager ConfigurationManager [get]
 Gets or sets the IConfigurationManager. More...
 

Detailed Description

A AggregateRepository<TAuthenticationToken> that is safe to use within Akka.NET

Template Parameters
TAuthenticationTokenThe Type of authentication token.