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 
    INTERNAL API
  • Method Summary

    Modifier and Type
    Method
    Description
    tryProcess(String processId, U processingUnit)
    Emulates behavior of the storage.
  • Method Details

    • tryProcess

      ProcessingResult tryProcess(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 return ProcessingSuccess, otherwise you should return some of the ProcessingFailure's.

      Parameters:
      processId - persistenceId or other id of the processing operation
      processingUnit - details about current operation to be executed
      Returns:
      needed result of processing the operation