Class ProcessingPolicy.DefaultPolicies.ReturnAfterNextNCond
java.lang.Object
org.apache.pekko.persistence.testkit.ProcessingPolicy.DefaultPolicies.ReturnAfterNextNCond
- All Implemented Interfaces:
ProcessingPolicy<U>
- Direct Known Subclasses:
ProcessingPolicy.DefaultPolicies.CountNextNCond
- Enclosing interface:
- ProcessingPolicy.DefaultPolicies<U>
public static class ProcessingPolicy.DefaultPolicies.ReturnAfterNextNCond
extends Object
implements ProcessingPolicy<U>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pekko.persistence.testkit.ProcessingPolicy
ProcessingPolicy.DefaultPolicies<U> -
Constructor Summary
ConstructorsConstructorDescriptionReturnAfterNextNCond(scala.Function0<ProcessingResult> returnOnTrigger, scala.Function0<ProcessingResult> returnNonTrigger, scala.Function2<String, U, Object> cond) -
Method Summary
Modifier and TypeMethodDescriptiontryProcess(String persistenceId, U processingUnit) Emulates behavior of the storage.
-
Constructor Details
-
ReturnAfterNextNCond
public ReturnAfterNextNCond(scala.Function0<ProcessingResult> returnOnTrigger, scala.Function0<ProcessingResult> returnNonTrigger, scala.Function2<String, U, Object> cond)
-
-
Method Details
-
tryProcess
Description copied from interface:ProcessingPolicyEmulates behavior of the storage. The function is invoked when any of the plugin's operations is executed. If you need this operation to succeed returnProcessingSuccess, otherwise you should return some of theProcessingFailure's.- Specified by:
tryProcessin interfaceProcessingPolicy<U>- Parameters:
persistenceId- persistenceId or other id of the processing operationprocessingUnit- details about current operation to be executed- Returns:
- needed result of processing the operation
-