T- The aggregate type this repository serves
public class CachingGenericEventSourcingRepository<T extends EventSourcedAggregateRoot> extends CachingEventSourcingRepository<T>
EventSourcedAggregateRoot. In contrast to the GenericEventSourcingRepository, it also supports caching. There is however, a convention that these EventSourcedAggregateRoot classes must adhere to. The type must declare an accessible constructor accepting a
AggregateIdentifieras single parameter. This constructor may not perform any initialization on the aggregate, other than setting the identifier. If the constructor is not accessible (not public), and the JVM's security setting allow it, the GenericEventSourcingRepository will try to make it accessible.
|Constructor and Description|
Creates a GenericEventSourcingRepository for aggregates of the given
doDeleteWithLock, doLoad, doSaveWithLock, setCache
createAggregate, getAggregateFactory, getTypeIdentifier, instantiateAggregate, setConflictResolver, setEventStore, setEventStreamDecorators, setSnapshotterTrigger, validateOnLoad
add, doDelete, doSave, load
aggregateType, using the default locking strategy (optimistic locking). The given type must at least provide an accessible constructor taking a UUID as single parameter. If the constructor is not accessible, the GenericEventSourcingRepository will attempt to make it so. If JVM security restrictions don't allow that, an exception is thrown.
aggregateType- The type of aggregate this repository holds
IncompatibleAggregateException- If there is no accessible constructor accepting a UUID as single parameter
Copyright © 2012. All Rights Reserved.