Interface ProcessorInstructionHandler


  • public interface ProcessorInstructionHandler
    Interface describing the instructions AxonServer can send for Event Processor management.
    • Method Detail

      • releaseSegment

        CompletableFuture<Boolean> releaseSegment​(int segmentId)
        Instruction to release the segment with given segmentId. 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 true after the segment has been successfully released. When failing to release the segment, the CompletableFuture must complete with either false or 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 given segmentId. 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 given segmentId with its counterpart. If the local node doesn't have a claim on the segment with given segmentId or 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.