Class ProcessingInstructionHelper
java.lang.Object
org.axonframework.axonserver.connector.util.ProcessingInstructionHelper
Utility class contain helper methods to extract information from
ProcessingInstructions.- Since:
- 4.0
- Author:
- Marc Gathier
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaxonServerSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve whether Axon Server supports streaming from the givenprocessingInstructions, by searching for the value ofProcessingKey.SERVER_SUPPORTS_STREAMING.static booleanclientSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve whether Client (query issuer) supports streaming from the givenprocessingInstructions, by searching for the value ofProcessingKey.CLIENT_SUPPORTS_STREAMING.static longnumberOfResults(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve the desired 'number of results' as alongfrom the givenprocessingInstructions, by searching for theProcessingInstructionwho's key equals theProcessingKey.NR_OF_RESULTS.static longRetrieve the priority as alongfrom the givenprocessingInstructions, by searching for theProcessingInstructionwho's key equals theProcessingKey.PRIORITY.static longRetrieve the desired 'number of results' as alongfrom the givenprocessingInstructions, by searching for theProcessingInstructionwho's key equals theProcessingKey.NR_OF_RESULTS.
-
Method Details
-
priority
public static long priority(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve the priority as alongfrom the givenprocessingInstructions, by searching for theProcessingInstructionwho's key equals theProcessingKey.PRIORITY.- Parameters:
processingInstructions- aListofProcessingInstructions to retrieve theProcessingKey.PRIORITYfrom- Returns:
- a
longspecifying the priority of a given operation
-
numberOfResults
public static long numberOfResults(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve the desired 'number of results' as alongfrom the givenprocessingInstructions, by searching for theProcessingInstructionwho's key equals theProcessingKey.NR_OF_RESULTS.- Parameters:
processingInstructions- aListofProcessingInstructions to retrieve theProcessingKey.NR_OF_RESULTSfrom- Returns:
- a
longspecifying the desired 'number of results' for a given operation
-
axonServerSupportsQueryStreaming
public static boolean axonServerSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve whether Axon Server supports streaming from the givenprocessingInstructions, by searching for the value ofProcessingKey.SERVER_SUPPORTS_STREAMING.- Parameters:
processingInstructions- aListofProcessingInstructions to retrieve theProcessingKey.SERVER_SUPPORTS_STREAMINGfrom- Returns:
trueif Axon Server supports streaming,falseotherwise
-
clientSupportsQueryStreaming
public static boolean clientSupportsQueryStreaming(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve whether Client (query issuer) supports streaming from the givenprocessingInstructions, by searching for the value ofProcessingKey.CLIENT_SUPPORTS_STREAMING.- Parameters:
processingInstructions- aListofProcessingInstructions to retrieve theProcessingKey.CLIENT_SUPPORTS_STREAMINGfrom- Returns:
trueif Client supports streaming,falseotherwise
-
timeout
public static long timeout(List<io.axoniq.axonserver.grpc.ProcessingInstruction> processingInstructions) Retrieve the desired 'number of results' as alongfrom the givenprocessingInstructions, by searching for theProcessingInstructionwho's key equals theProcessingKey.NR_OF_RESULTS.- Parameters:
processingInstructions- aListofProcessingInstructions to retrieve theProcessingKey.NR_OF_RESULTSfrom- Returns:
- a
longspecifying the desired 'number of results' for a given operation
-