Interface InstructionAckSource<T>
- Type Parameters:
T- the type of message to be sent
- All Known Implementing Classes:
DefaultInstructionAckSource
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Responsible for sending instruction acknowledgements.
- Since:
- 4.2.1
- Author:
- Milan Savic
-
Method Summary
Modifier and TypeMethodDescriptionvoidsendAck(String instructionId, boolean success, io.axoniq.axonserver.grpc.ErrorMessage error, io.grpc.stub.StreamObserver<T> stream) Sends an acknowledgement.default voidsendSuccessfulAck(String instructionId, io.grpc.stub.StreamObserver<T> stream) Sends successful acknowledgement.default voidsendUnsuccessfulAck(String instructionId, io.axoniq.axonserver.grpc.ErrorMessage error, io.grpc.stub.StreamObserver<T> stream) Sends unsuccessful acknowledgement.default voidsendUnsupportedInstruction(String instructionId, String source, io.grpc.stub.StreamObserver<T> stream) Sends acknowledgement of unsupported instruction.
-
Method Details
-
sendSuccessfulAck
Sends successful acknowledgement.- Parameters:
instructionId- identifier of successful instruction. Ifnull, acknowledgement will not be sent.stream- the stream for sending acknowledgements
-
sendUnsupportedInstruction
default void sendUnsupportedInstruction(String instructionId, String source, io.grpc.stub.StreamObserver<T> stream) Sends acknowledgement of unsupported instruction.- Parameters:
instructionId- identifier of successful instruction. Ifnull, acknowledgement will not be sent.source- the location where error occurredstream- the stream for sending acknowledgements
-
sendUnsuccessfulAck
default void sendUnsuccessfulAck(String instructionId, io.axoniq.axonserver.grpc.ErrorMessage error, io.grpc.stub.StreamObserver<T> stream) Sends unsuccessful acknowledgement.- Parameters:
instructionId- identifier of successful instruction. Ifnull, acknowledgement will not be sent.error- the cause of the errorstream- the stream for sending acknowledgements
-
sendAck
void sendAck(String instructionId, boolean success, io.axoniq.axonserver.grpc.ErrorMessage error, io.grpc.stub.StreamObserver<T> stream) Sends an acknowledgement.- Parameters:
instructionId- identifier of successful instruction. Ifnull, acknowledgement will not be sent.success-trueif acknowledgement is successful,falseotherwiseerror- the cause of the error. Providenullfor successful acknowledgementstream- the stream for sending acknowledgements
-