-
- All Implemented Interfaces:
public interface CommandContext
-
-
Method Summary
Modifier and Type Method Description abstract Unitadd(AggregateRoot aggregateRoot)Add a new aggregate into the current command context. abstract CompletableFuture<Boolean>addAsync(AggregateRoot aggregateRoot)Add a new aggregate into the current command context synchronously, and then return a completed task object. abstract <T extends AggregateRoot> Tget(Object id, Boolean firstFromCache, Class<T> aggregateRootType)Get an aggregate sync from the current command context. abstract <T extends AggregateRoot> Tget(Object id, Class<T> aggregateRootType)Get an aggregate sync from the current command context, default from cache. abstract <T extends AggregateRoot> CompletableFuture<T>getAsync(Object id, Boolean firstFromCache, Class<T> aggregateRootType)Get an aggregate async from the current command context. abstract <T extends AggregateRoot> CompletableFuture<T>getAsync(Object id, Class<T> aggregateRootType)Get an aggregate async from the current command context, default from cache. abstract StringgetResult()Get result. abstract UnitsetResult(String result)Get result. abstract ApplicationMessagegetApplicationMessage()Set an application message. abstract UnitsetApplicationMessage(ApplicationMessage applicationMessage)Set an application message. -
-
Method Detail
-
add
abstract Unit add(AggregateRoot aggregateRoot)
Add a new aggregate into the current command context.
-
addAsync
abstract CompletableFuture<Boolean> addAsync(AggregateRoot aggregateRoot)
Add a new aggregate into the current command context synchronously, and then return a completed task object.
-
get
abstract <T extends AggregateRoot> T get(Object id, Boolean firstFromCache, Class<T> aggregateRootType)
Get an aggregate sync from the current command context.
-
get
abstract <T extends AggregateRoot> T get(Object id, Class<T> aggregateRootType)
Get an aggregate sync from the current command context, default from cache.
-
getAsync
abstract <T extends AggregateRoot> CompletableFuture<T> getAsync(Object id, Boolean firstFromCache, Class<T> aggregateRootType)
Get an aggregate async from the current command context.
-
getAsync
abstract <T extends AggregateRoot> CompletableFuture<T> getAsync(Object id, Class<T> aggregateRootType)
Get an aggregate async from the current command context, default from cache.
-
getApplicationMessage
abstract ApplicationMessage getApplicationMessage()
Set an application message.
-
setApplicationMessage
abstract Unit setApplicationMessage(ApplicationMessage applicationMessage)
Set an application message.
-
-
-
-