Interface EventTransformationService.TransformationStream

  • All Known Implementing Classes:
    GrpcTransformationStream
    Enclosing interface:
    EventTransformationService

    public static interface EventTransformationService.TransformationStream
    The stream toward the transformation needed to register the required events' changes.
    • Method Detail

      • deleteEvent

        CompletableFuture<Void> deleteEvent​(long token,
                                            long sequence)
        Registers the request to delete the event with the specified token.
        Parameters:
        token - the token of the event to be deleted
        sequence - the expected last sequence of the transformation, used to check that no change request before this one has been lost
        Returns:
        a CompletableFuture that completes when the request has been received by Axon Server.
      • replaceEvent

        CompletableFuture<Void> replaceEvent​(long token,
                                             Event event,
                                             long sequence)
        Registers the request to replace the event with the specified token.
        Parameters:
        token - the token of the event to be replaced
        event - the new version of the event, to be used as a replacement for the original one
        sequence - the expected last sequence of the transformation, used to check that no change request before this one has been lost
        Returns:
        a CompletableFuture that completes when the request has been received by Axon Server.
      • complete

        void complete()
        Completes the stream.
      • onCompletedByServer

        void onCompletedByServer​(Consumer<Throwable> onCompleted)
        Resister a callback function that is invoked when the stream is completed by Axon Server.
        Parameters:
        onCompleted - the callback function invoked when the stream is completed by Axon Server.