public class AsyncToSyncAggregateCrudAdapter extends Object implements AggregateCrud
| Constructor and Description |
|---|
AsyncToSyncAggregateCrudAdapter(AggregateCrud target) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Aggregate<T>> |
find(String aggregateType,
String entityId,
Optional<AggregateCrudFindOptions> findOptions)
Find a Aggregate events by giving aggregateType and entityId
|
EntityIdVersionAndEventIds |
save(String aggregateType,
List<EventTypeAndData> events,
Optional<AggregateCrudSaveOptions> options)
Create a new Aggregate by processing a command and persisting the events
|
void |
setTimeoutOptions(AsyncToSyncTimeoutOptions timeoutOptions) |
EntityIdVersionAndEventIds |
update(EntityIdAndType entityIdAndType,
Int128 entityVersion,
List<EventTypeAndData> events,
Optional<AggregateCrudUpdateOptions> updateOptions)
Update the Aggregate by processing a command and persisting the events
|
public AsyncToSyncAggregateCrudAdapter(AggregateCrud target)
public EntityIdVersionAndEventIds save(String aggregateType, List<EventTypeAndData> events, Optional<AggregateCrudSaveOptions> options)
AggregateCrudsave in interface AggregateCrudaggregateType - the aggregateType for event storeevents - the list of events for the aggregateoptions - the command optionspublic <T extends Aggregate<T>> LoadedEvents find(String aggregateType, String entityId, Optional<AggregateCrudFindOptions> findOptions)
AggregateCrudfind in interface AggregateCrudT - type TaggregateType - the aggregateType for event storeentityId - entity IdfindOptions - the command optionspublic EntityIdVersionAndEventIds update(EntityIdAndType entityIdAndType, Int128 entityVersion, List<EventTypeAndData> events, Optional<AggregateCrudUpdateOptions> updateOptions)
AggregateCrudupdate in interface AggregateCrudentityIdAndType - the aggregate id and aggregateType for udpating on event storeentityVersion - entity version numberevents - the list of events for the aggregateupdateOptions - the command optionspublic void setTimeoutOptions(AsyncToSyncTimeoutOptions timeoutOptions)
Copyright © 2021. All rights reserved.