类 RepeatSynchronizationManager

    • 方法详细资料

      • getContext

        public static RepeatContext getContext()
        Getter for the current context. A context is shared by all items in the batch, so this method is intended to return the same context object independent of whether the callback is running synchronously or asynchronously with the surrounding RepeatOperations.
        返回:
        the current RepeatContext or null if there is none (if we are not in a batch).
      • setCompleteOnly

        public static void setCompleteOnly()
        Convenience method to set the current repeat operation to complete if it exists.
      • register

        public static RepeatContext register​(RepeatContext context)
        Method for registering a context - should only be used by RepeatOperations implementations to ensure that getContext() always returns the correct value.
        参数:
        context - a new context at the start of a batch.
        返回:
        the old value if there was one.
      • clear

        public static RepeatContext clear()
        Clear the current context at the end of a batch - should only be used by RepeatOperations implementations.
        返回:
        the old value if there was one.
      • setAncestorsCompleteOnly

        public static void setAncestorsCompleteOnly()
        Set current session and all ancestors (via parent) to complete.,