-
- All Implemented Interfaces:
public interface MemoryCache
-
-
Method Summary
Modifier and Type Method Description abstract CompletableFuture<AggregateRoot>getAsync(Object aggregateRootId)Get an aggregate from memory cache. abstract <T extends AggregateRoot> CompletableFuture<T>getAsync(Object aggregateRootId, Class<T> aggregateRootType)Get a strong type aggregate from memory cache. abstract <T extends AggregateRoot> UnitacceptAggregateRootChanges(T aggregateRoot)Accept the given aggregate root's changes. abstract <T extends AggregateRoot> UnitrefreshAggregate(T aggregateRoot)Refresh the given aggregate. abstract CompletableFuture<AggregateRoot>refreshAggregateFromEventStoreAsync(String aggregateRootTypeName, String aggregateRootId)Refresh the aggregate memory cache by replaying events of event store, and return the refreshed aggregate root. abstract <T extends AggregateRoot> CompletableFuture<T>refreshAggregateFromEventStoreAsync(Class<T> aggregateRootType, String aggregateRootId)Refresh the aggregate memory cache by replaying events of event store, and return the refreshed aggregate root. abstract Unitstart()Start background tasks. abstract Unitstop()Stop background tasks. -
-
Method Detail
-
getAsync
abstract CompletableFuture<AggregateRoot> getAsync(Object aggregateRootId)
Get an aggregate from memory cache.
-
getAsync
abstract <T extends AggregateRoot> CompletableFuture<T> getAsync(Object aggregateRootId, Class<T> aggregateRootType)
Get a strong type aggregate from memory cache.
-
acceptAggregateRootChanges
abstract <T extends AggregateRoot> Unit acceptAggregateRootChanges(T aggregateRoot)
Accept the given aggregate root's changes.
-
refreshAggregate
abstract <T extends AggregateRoot> Unit refreshAggregate(T aggregateRoot)
Refresh the given aggregate.
-
refreshAggregateFromEventStoreAsync
abstract CompletableFuture<AggregateRoot> refreshAggregateFromEventStoreAsync(String aggregateRootTypeName, String aggregateRootId)
Refresh the aggregate memory cache by replaying events of event store, and return the refreshed aggregate root.
-
refreshAggregateFromEventStoreAsync
abstract <T extends AggregateRoot> CompletableFuture<T> refreshAggregateFromEventStoreAsync(Class<T> aggregateRootType, String aggregateRootId)
Refresh the aggregate memory cache by replaying events of event store, and return the refreshed aggregate root.
-
-
-
-