Class MethodInterrupter


  • public final class MethodInterrupter
    extends Object
    Interrupts long-running methods.

    It is an AspectJ aspect and you are not supposed to use it directly. It is instantiated by AspectJ runtime framework when your code is annotated with Timeable annotation.

    The class is thread-safe.

    Since:
    0.7.16
    • Constructor Detail

      • MethodInterrupter

        public MethodInterrupter()
        Public ctor.
    • Method Detail

      • wrap

        public Object wrap​(org.aspectj.lang.ProceedingJoinPoint point)
                    throws Throwable
        Run and interrupt a method, if stuck.

        Try NOT to change the signature of this method, in order to keep it backward compatible.

        Parameters:
        point - Joint point
        Returns:
        The result of call
        Throws:
        Throwable - If something goes wrong inside