Package akka.persistence.testkit
Class ProcessingPolicy.DefaultPolicies.ReturnAfterNextNCond
- java.lang.Object
-
- akka.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 java.lang.Object implements ProcessingPolicy<U>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.persistence.testkit.ProcessingPolicy
ProcessingPolicy.DefaultPolicies<U>
-
-
Constructor Summary
Constructors Constructor Description ReturnAfterNextNCond(scala.Function0<ProcessingResult> returnOnTrigger, scala.Function0<ProcessingResult> returnNonTrigger, scala.Function2<java.lang.String,U,java.lang.Object> cond)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingResulttryProcess(java.lang.String persistenceId, U processingUnit)Emulates behavior of the storage.
-
-
-
Constructor Detail
-
ReturnAfterNextNCond
public ReturnAfterNextNCond(scala.Function0<ProcessingResult> returnOnTrigger, scala.Function0<ProcessingResult> returnNonTrigger, scala.Function2<java.lang.String,U,java.lang.Object> cond)
-
-
Method Detail
-
tryProcess
public ProcessingResult tryProcess(java.lang.String persistenceId, U processingUnit)
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
-
-