-
- All Implemented Interfaces:
-
org.enodeframework.domain.Repository
public class DefaultRepository implements Repository
-
-
Constructor Summary
Constructors Constructor Description DefaultRepository(MemoryCache memoryCache)
-
Method Summary
Modifier and Type Method Description <T extends AggregateRoot> CompletableFuture<T>getAsync(Class<T> aggregateRootType, Object aggregateRootId)Get an aggregate from memory cache, if not exist, get it from event store. CompletableFuture<AggregateRoot>getAsync(Object aggregateRootId)Get an aggregate from memory cache, if not exist, get it from event store. <T extends AggregateRoot> voidrefreshAggregate(T aggregateRoot)Refresh memory cache with given aggregate. -
-
Constructor Detail
-
DefaultRepository
DefaultRepository(MemoryCache memoryCache)
-
-
Method Detail
-
getAsync
<T extends AggregateRoot> CompletableFuture<T> getAsync(Class<T> aggregateRootType, Object aggregateRootId)
Get an aggregate from memory cache, if not exist, get it from event store.
-
getAsync
CompletableFuture<AggregateRoot> getAsync(Object aggregateRootId)
Get an aggregate from memory cache, if not exist, get it from event store.
-
refreshAggregate
<T extends AggregateRoot> void refreshAggregate(T aggregateRoot)
Refresh memory cache with given aggregate.
-
-
-
-