Interface ProcessorInstructionHandler
-
public interface ProcessorInstructionHandlerInterface describing the instructions AxonServer can send for Event Processor management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Boolean>mergeSegment(int segmentId)Instruction to merge the segment with givensegmentIdwith its counterpart.CompletableFuture<Void>pauseProcessor()Instruction to pause the processor for which this handler was registered.CompletableFuture<Boolean>releaseSegment(int segmentId)Instruction to release the segment with givensegmentId.CompletableFuture<Boolean>splitSegment(int segmentId)Instruction to split the segment with givensegmentId.CompletableFuture<Void>startProcessor()Instruction to start the processor for which this handler was registered.
-
-
-
Method Detail
-
releaseSegment
CompletableFuture<Boolean> releaseSegment(int segmentId)
Instruction to release the segment with givensegmentId. If the local node doesn't have the given segment claimed, it should take precautions to prevent claiming it immediately.The return future must be completed with a
trueafter the segment has been successfully released. When failing to release the segment, the CompletableFuture must complete with eitherfalseor exceptionally.- Parameters:
segmentId- the id of the segment to release- Returns:
- a CompletableFuture that completes to true or false, depending on the successful release of the segment
-
splitSegment
CompletableFuture<Boolean> splitSegment(int segmentId)
Instruction to split the segment with givensegmentId. If the local node doesn't have a claim on the given segment, it must try to claim it.- Parameters:
segmentId- the identifier of the segment to split- Returns:
- a CompletableFuture that completes to true or false, depending on the successful split of the segment
-
mergeSegment
CompletableFuture<Boolean> mergeSegment(int segmentId)
Instruction to merge the segment with givensegmentIdwith its counterpart. If the local node doesn't have a claim on the segment with givensegmentIdor its counterpart, then it must attempt to claim both.- Parameters:
segmentId- the identifier of the segment to merge- Returns:
- a CompletableFuture that completes to true or false, depending on the successful merge of the segment
-
pauseProcessor
CompletableFuture<Void> pauseProcessor()
Instruction to pause the processor for which this handler was registered. All claims for segments by the processor must be released.- Returns:
- a CompletableFuture that completes when the processor has been paused.
-
startProcessor
CompletableFuture<Void> startProcessor()
Instruction to start the processor for which this handler was registered.- Returns:
- a CompletableFuture that completes when the processor has been started.
-
-