Package akka.persistence.testkit
Interface ProcessingPolicy<U>
-
- Type Parameters:
U
- type determines operations which storage can perform.
- All Known Implementing Classes:
ProcessingPolicy.DefaultPolicies.CountNextNCond
,ProcessingPolicy.DefaultPolicies.FailNextN
,ProcessingPolicy.DefaultPolicies.FailNextNCond
,ProcessingPolicy.DefaultPolicies.PassAll$
,ProcessingPolicy.DefaultPolicies.RejectNextN
,ProcessingPolicy.DefaultPolicies.RejectNextNCond
,ProcessingPolicy.DefaultPolicies.ReturnAfterNextNCond
public interface ProcessingPolicy<U>
Policies allow to emulate behavior of the storage (failures and rejections).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ProcessingPolicy.DefaultPolicies<U>
INTERNAL API
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProcessingResult
tryProcess(java.lang.String processId, U processingUnit)
Emulates behavior of the storage.
-
-
-
Method Detail
-
tryProcess
ProcessingResult tryProcess(java.lang.String processId, U processingUnit)
Emulates 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.- Parameters:
processId
- persistenceId or other id of the processing operationprocessingUnit
- details about current operation to be executed- Returns:
- needed result of processing the operation
-
-