Interface ActiveTransformation
-
- All Known Implementing Classes:
DefaultActiveTransformation
public interface ActiveTransformationClass responsible to interact with the active transformation.- Since:
- 2023.1.0
- Author:
- Sara Pellegrini
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<EventTransformation>cancel()Cancels the active transformation.CompletableFuture<EventTransformation>startApplying()Requests the transformation to be applied.CompletableFuture<ActiveTransformation>transform(Transformer transformer)Accepts aTransformerto collect the requested changes and to register them into the active transformation.
-
-
-
Method Detail
-
transform
CompletableFuture<ActiveTransformation> transform(Transformer transformer)
Accepts aTransformerto collect the requested changes and to register them into the active transformation.- Parameters:
transformer- theTransformerused to append the required changes to the active transformation- Returns:
- a
CompletableFutureof the active transformation that completes when all changes have been registered.
-
startApplying
CompletableFuture<EventTransformation> startApplying()
Requests the transformation to be applied. After this method is invoked, it will not be possible to cancel the transformation or to register new changes in it. Axon Server will asynchronously apply the transformation to the event store, making the changes effective. The returnedCompletableFuturecompletes when the request to start applying has been received form AS, it does not wait the apply process is completed. Depending on the number of transformation actions contained in the transformation, the apply process can take a long time before to be completed.- Returns:
- a
CompletableFutureof the Event Transformation, that completes only after the start applying request has been received by AS.
-
cancel
CompletableFuture<EventTransformation> cancel()
Cancels the active transformation. After this method is invoked, it will not be possible to apply the transformation or to register new changes in it.- Returns:
- a
CompletableFutureof the Event Transformation, that completes only after the cancel request has been received by AS.
-
-