Class GraphingRequestInterceptor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CORTEX_OUTPUT_FILENAME_OPTION
      Key in Cortex config options for specifying the filename the call graph should be written too.
      static java.lang.String GUICE_ENHANCED  
      GraphPlan plan  
      static java.util.List<java.util.function.Function<java.lang.Integer,​java.lang.Boolean>> scopes  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)  
      protected java.lang.Boolean isTracingScope​(java.lang.reflect.Method method)  
      void postIntercept​(java.util.Map<java.lang.String,​java.lang.String> cortexSessionOptions)
      Saves the call graph to an output file based on the given session options.
      java.util.Map<java.lang.String,​java.lang.String> suggestedOptions​(java.lang.String value)
      Suggests default options for the interceptor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CORTEX_OUTPUT_FILENAME_OPTION

        public static final java.lang.String CORTEX_OUTPUT_FILENAME_OPTION
        Key in Cortex config options for specifying the filename the call graph should be written too.
        See Also:
        Constant Field Values
      • scopes

        public static java.util.List<java.util.function.Function<java.lang.Integer,​java.lang.Boolean>> scopes
    • Constructor Detail

      • GraphingRequestInterceptor

        public GraphingRequestInterceptor​(GraphPlan plan,
                                          java.lang.Integer modifier)
        Create an interceptor instance with graph plan and trace method access modifier scope, either Public -> Protected -> Any.
        Parameters:
        plan - The CortexSession scoped plan
        modifier - Method access modifier to check (see Modifier)
      • GraphingRequestInterceptor

        public GraphingRequestInterceptor​(GraphPlan plan)
        Creates an interceptor instance with the given GraphPlan and default method access modifier scope of Any
        Parameters:
        plan - The CortexSession scoped plan
      • GraphingRequestInterceptor

        public GraphingRequestInterceptor()
        Creates an interceptor instance with a new GraphPlan instance and default method access modifier scope of Any
    • Method Detail

      • isTracingScope

        protected java.lang.Boolean isTracingScope​(java.lang.reflect.Method method)
      • invoke

        public java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Throws:
        java.lang.Throwable
      • suggestedOptions

        public java.util.Map<java.lang.String,​java.lang.String> suggestedOptions​(java.lang.String value)
        Description copied from interface: CortexInterceptor
        Suggests default options for the interceptor.
        Specified by:
        suggestedOptions in interface CortexInterceptor
        Parameters:
        value - context dependent value for customization
        Returns:
        suggested default options
      • postIntercept

        public void postIntercept​(java.util.Map<java.lang.String,​java.lang.String> cortexSessionOptions)
        Saves the call graph to an output file based on the given session options. An IllegalArgumentException will be raised if the option "spark.cortex.test.intercept.graphing.outfile" is not present in session options.
        Specified by:
        postIntercept in interface CortexInterceptor
        Parameters:
        cortexSessionOptions - Configuration options from the CortexSession