Class ProcessingPolicy.DefaultPolicies.ReturnAfterNextNCond

    • 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: ProcessingPolicy
        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.

        Specified by:
        tryProcess in interface ProcessingPolicy<U>
        Parameters:
        persistenceId - persistenceId or other id of the processing operation
        processingUnit - details about current operation to be executed
        Returns:
        needed result of processing the operation