Class NamedOperationResolver

    • Field Detail

      • DEPTH_LIMIT_DEFAULT

        public static final int DEPTH_LIMIT_DEFAULT
        Default depth the resolver will go when checking for nested named operations
        See Also:
        Constant Field Values
    • Constructor Detail

      • NamedOperationResolver

        public NamedOperationResolver​(String suffixNamedOperationCacheName,
                                      int depthLimit)
      • NamedOperationResolver

        public NamedOperationResolver​(String suffixNamedOperationCacheName)
      • NamedOperationResolver

        public NamedOperationResolver​(NamedOperationCache cache,
                                      int depthLimit)
    • Method Detail

      • getDepthLimit

        public int getDepthLimit()
      • preExecute

        public void preExecute​(OperationChain<?> opChain,
                               Context context)
        Description copied from interface: GraphHook
        Called from Graph before an OperationChain is executed.
        Specified by:
        preExecute in interface GraphHook
        Parameters:
        opChain - the OperationChain being executed. This can be modified/optimised in any GraphHook.
        context - the Context in which the operation chain was executed. The context also holds a reference to the original operation chain.
      • postExecute

        public <T> T postExecute​(T result,
                                 OperationChain<?> opChain,
                                 Context context)
        Description copied from interface: GraphHook
        Called from Graph after an OperationChain is executed.
        Specified by:
        postExecute in interface GraphHook
        Type Parameters:
        T - the result type
        Parameters:
        result - the result from the operation chain
        opChain - the OperationChain that was executed. This can be modified/optimised in any GraphHook.
        context - the Context in which the operation chain was executed. The context also holds a reference to the original operation chain.
        Returns:
        result object
      • onFailure

        public <T> T onFailure​(T result,
                               OperationChain<?> opChain,
                               Context context,
                               Exception e)
        Description copied from interface: GraphHook
        Called from Graph if an error occurs whilst executing the OperationChain.
        Specified by:
        onFailure in interface GraphHook
        Type Parameters:
        T - the result type
        Parameters:
        result - the result from the operation chain - likely to be null.
        opChain - the OperationChain that was executed. This can be modified/optimised in any GraphHook.
        context - the Context in which the operation chain was executed. The context also holds a reference to the original operation chain.
        e - the exception
        Returns:
        result object