将服务恢复正常
@param invoker
@param invocation
341182
private void toBeNormal(Invoker<?> invoker, Invocation invocation){
        String interfaceName = invoker.getUrl().getParameter(Constants.INTERFACE_KEY);
        String method = invocation.getMethodName();
        StringBuffer methodConfig = new StringBuffer(Config.DUBBO_REFERENCE_PREFIX);
        methodConfig.append(interfaceName).append(".").append(method);
        String methodKey = methodConfig.toString();
        //从其中删除对应的异常计数器
        BreakCounter counter = breakCounterMap.remove(methodKey);
        if(counter!=null){
            logger.info("[{}] [{}.{}] to be normal",localHost,interfaceName,methodKey);
            //将这个counter设置为失效
            counter.disable();
        }
    }
817124
public function invoke(MethodInvocation $invocation)
    {
        /** @var Cacheable $annotation */
        $annotation = $invocation->getMethod()->getAnnotation($this->annotation);
        $keys = $this->generateCacheName($annotation->cacheName, $invocation);
        if (!is_array($annotation->key)) {
            $annotation->key = [$annotation->key];
        }
        $keys = $this->detectCacheKeys($invocation, $annotation, $keys);
        // detect use cache driver
        $cache = $this->detectCacheRepository($annotation);
        $key = $this->recursiveImplode($this->join, $keys);
        if ($cache->has($key)) {
            return $cache->get($key);
        }
        $result = $invocation->proceed();
        if (!$annotation->negative) {
            if ($result) {
                $cache->add($key, $result, $annotation->lifetime);
            }

            return $result;
        }
        if (is_null($result)) {
            $cache->add($key, $result, $annotation->lifetime);
        }

        return $result;
    }
849791
public void invokeLater(Runnable r) {
    queue.add(r);
    synchronized(this) {
      if(synchronizer == null) {
        runQueue();
      }
      else {
        synchronizer.activate();
      }
    }
  }
226705
@Override
	public Object invoke(final Invocation invocation) throws Exception {
		if (invocation == null) throw new NullPointerException("invocation");

		MethodDescriptor<?, ?> method = invocation.getMethod();
		DataTypeDescriptor<?> resultd = (DataTypeDescriptor<?>) method.getResult();
		MessageDescriptor<? extends Message> excd = descriptor.getExc();

		RpcRequest request = protocol.getRequest(invocation);
		return session.send(request, resultd, excd);
	}
823461
private static Invoker getInvoker(HttpMessageContainer httpMessageContainer) {
        Invoker invoker;
        switch (httpMessageContainer.getName()) {
        // TODO Allow to inject the HTTP fuzz component
        case "History Table":
            invoker = Invoker.HISTORY_PANEL;
            break;
        case "treeSite":
            invoker = Invoker.SITES_PANEL;
            break;
        case AlertPanel.ALERT_TREE_PANEL_NAME:
            invoker = Invoker.ALERTS_PANEL;
            break;
        case SearchPanel.HTTP_MESSAGE_CONTAINER_NAME:
            invoker = Invoker.SEARCH_PANEL;
            break;
        case SpiderPanel.HTTP_MESSAGE_CONTAINER_NAME:
            invoker = Invoker.SPIDER_PANEL;
            break;
        case ActiveScanPanel.MESSAGE_CONTAINER_NAME:
            invoker = Invoker.ACTIVE_SCANNER_PANEL;
            break;
        case "ForcedBrowseMessageContainer":
            invoker = Invoker.FORCED_BROWSE_PANEL;
            break;
        case "fuzz.httpfuzzerResultsContentPanel":
            invoker = Invoker.FUZZER_PANEL;
            break;
        default:
            invoker = Invoker.UNKNOWN;
        }
        return invoker;
    }
260817
def check_invocation(node, type)
      args = sort_args_by_position(node.args,
                                   node.splat,
                                   node.keywords.values,
                                   node.kwarg_splat)

      check_commas_after_args(args, "#{type} arguments")
    end
1039369
def invoke_with_call_chain(task_args, invocation_chain) # :nodoc:
      new_chain = InvocationChain.append(self, invocation_chain)
      @lock.synchronize do
        if application.options.trace
          application.trace "** Invoke #{name} #{format_trace_flags}"
        end
        return if @already_invoked
        @already_invoked = true
        invoke_prerequisites(task_args, new_chain)
        execute(task_args) if needed?
      end
    rescue Exception => ex
      add_chain_to(ex, new_chain)
      raise ex
    end
918865
@Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
    {
        if (constructed)
        {

            String methodName = method.getName();
            int params = args.length;

            if (params == 0)
            {
                if (isUninitialized() && method.equals(getIdentifierMethod))
                {
                    return getIdentifier();
                }

                else if ("getKunderaLazyInitializer".equals(methodName))
                {
                    return this;
                }
            }

            Object target = getImplementation();

            String[] strArr = entityName.split("#");
            String fieldName = strArr[1];

            if (owner != null)
            {
                EntityMetadata m = KunderaMetadataManager.getEntityMetadata(persistenceDelegator.getKunderaMetadata(),
                        owner.getClass());
                Relation r = m.getRelation(fieldName);
                if (r != null)
                {
                    PropertyAccessorHelper.set(owner, r.getProperty(), target);
                }
                if (r.getBiDirectionalField() != null && method.getReturnType().equals(m.getEntityClazz()))
                {
                    PropertyAccessorHelper.set(target, r.getBiDirectionalField(), owner);
                }

            }

            try
            {
                final Object returnValue;
                if (method.isAccessible())
                {
                    if (!method.getDeclaringClass().isInstance(target))
                    {
                        throw new ClassCastException(target.getClass().getName());
                    }
                    returnValue = method.invoke(target, args);
                }
                else
                {
                    if (!method.isAccessible())
                    {
                        method.setAccessible(true);
                    }
                    returnValue = method.invoke(target, args);
                }
                return ((returnValue == target) ? proxy : returnValue);
            }
            catch (InvocationTargetException ite)
            {
                throw new LazyInitializationException(ite);
            }
        }
        else
        {
            // while constructor is running
            throw new LazyInitializationException("unexpected case hit, method=" + method.getName());
        }

    }
287732
def invoke(invocation):
    
    (invocation.module_path,
     invocation.module_source) = get_module_data(invocation.module_name)
    planner = _get_planner(invocation)

    if invocation.wrap_async:
        response = _invoke_async_task(invocation, planner)
    elif planner.should_fork():
        response = _invoke_isolated_task(invocation, planner)
    else:
        _propagate_deps(invocation, planner, invocation.connection.context)
        response = invocation.connection.get_chain().call(
            ansible_mitogen.target.run_module,
            kwargs=planner.get_kwargs(),
        )

    return invocation.action._postprocess_response(response)
859058
public function invoke(MethodInvocation $invocation)
    {
        /** @var \Ytake\LaravelAspect\Annotation\Loggable $annotation */
        $annotation = $invocation->getMethod()->getAnnotation($this->annotation);
        $start = microtime(true);
        $result = $invocation->proceed();
        $time = number_format(microtime(true) - $start, 15);
        $logFormat = $this->logFormatter($annotation, $invocation);
        $logger = static::$logger;
        if (!$annotation->skipResult) {
            $logFormat['context']['result'] = $result;
        }
        $logFormat['context']['time'] = $time;
        /** Monolog\Logger */
        if ($logger instanceof LogManager) {
            if (!is_null($annotation->driver)) {
                $logger = $logger->driver($annotation->driver);
            }
            $logger->addRecord($logFormat['level'], $logFormat['message'], $logFormat['context']);
        }

        return $result;
    }
874356
@AroundInvoke
    public Object handle(InvocationContext ic) throws Exception {
        Method m = ic.getMethod();
        Object targetObject = ic.getTarget();
        Class<?> targetClass = targetObject == null ? m.getDeclaringClass()
                : targetObject.getClass();
        CatchHandler exceptionHandlerAnnotation = AnnotationUtils
                .findAnnotation(m, targetClass, CatchHandler.class);
        Exception unexpectedException = null;

        if (exceptionHandlerAnnotation == null) {
            throw new IllegalStateException(
                    "The interceptor annotation can not be determined!");
        }

        CatchHandling[] exceptionHandlingAnnotations = exceptionHandlerAnnotation
                .value();
        Class<? extends Throwable>[] unwrap = exceptionHandlerAnnotation
                .unwrap();

        try {
            return ic.proceed();
        } catch (Exception ex) {
            if (!contains(unwrap, InvocationTargetException.class)) {
                unwrap = Arrays.copyOf(unwrap, unwrap.length + 1);
                unwrap[unwrap.length - 1] = InvocationTargetException.class;
            }

            // Unwrap Exception if ex is instanceof InvocationTargetException
            Throwable t = ExceptionUtils.unwrap(ex,
                    InvocationTargetException.class);
            boolean exceptionHandled = false;
            boolean cleanupInvoked = false;

            if (exceptionHandlingAnnotations.length > 0) {
                for (CatchHandling handling : exceptionHandlingAnnotations) {
                    if (handling.exception().isInstance(t)) {
                        try {
                            handleThrowable(t);
                            exceptionHandled = true;
                        } catch (Exception unexpected) {
                            unexpectedException = unexpected;
                        }

                        // Only invoke cleanup declared at handling level
                        if (!handling.cleanup().equals(Object.class)) {
                            cleanupInvoked = invokeCleanups(targetClass, targetObject,
                                    handling.cleanup(), t);
                        }

                        break;
                    }
                }
            }

            // Handle the default exception type if no handlings are
            // declared or the handling did not handle the exception
            if (!exceptionHandled) {
                if (exceptionHandlerAnnotation.exception().isInstance(t)) {
                    try {
                        handleThrowable(t);
                        exceptionHandled = true;
                    } catch (Exception unexpected) {
                        unexpectedException = unexpected;
                    }

                    if (!exceptionHandlerAnnotation.cleanup().equals(
                            Object.class) && !cleanupInvoked) {
                        if (!cleanupInvoked) {
                            invokeCleanups(targetClass, targetObject,
                                    exceptionHandlerAnnotation.cleanup(), t);
                        }
                    }
                }
            }

            if (!exceptionHandled) {
                if (t instanceof Exception) {
                    unexpectedException = (Exception) t;
                } else {
                    unexpectedException = new Exception(t);
                }
            }
        }

        if (unexpectedException != null) {
            throw unexpectedException;
        }

        return null;
    }
1256233
public void intercept(Invocation inv) {
		Controller c = inv.getController();
		String localeParaName = getLocaleParaName();
		String locale = c.getPara(localeParaName);
		
		if (StrKit.notBlank(locale)) {	// change locale, write cookie
			c.setCookie(localeParaName, locale, Const.DEFAULT_I18N_MAX_AGE_OF_COOKIE);
		}
		else {							// get locale from cookie and use the default locale if it is null
			locale = c.getCookie(localeParaName);
			if (StrKit.isBlank(locale))
				locale = I18n.defaultLocale;
		}
		
		inv.invoke();
		
		if (isSwitchView) {
			switchView(locale, c);
		}
		else {
			Res res = I18n.use(getBaseName(), locale);
			c.setAttr(getResName(), res);
		}
	}
518037
private Map<String, Object> bindParams(CallableSignatureContext sig, CallableInvocationContext inv) {
    
    if(inv == null) {
      return Collections.emptyMap();
    }

    Map<String, Object> vals = new HashMap<>();
    
    if (inv.posParams != null) {

      //
      // Ensure legality of call
      //

      // Can only use positional or named; not both
      if (inv.namedParams != null) {
        throw new InvocationException("only positional or named parameters are allowed", getLocation(inv));
      }

      //
      // Match up parameters
      //

      ListIterator<ParameterDeclContext> paramDeclIter = sig.paramDecls.listIterator();
      ListIterator<ExpressionContext> paramExprIter = inv.posParams.exprs.listIterator();
      
      ParameterDeclContext allDecl = null;

      while (paramDeclIter.hasNext()) {

        ParameterDeclContext paramDecl = paramDeclIter.next();

        if (paramDecl.flag != null && paramDecl.flag.getText().equals("*")) {
          if (allDecl != null) {
            throw new ExecutionException("only a single parameter can be marked with '*'", getLocation(paramDecl));
          }
          allDecl = paramDecl;
          continue;
        }
        
        String paramName = name(paramDecl);
        
        // Find expression (or use default)
        ExpressionContext paramExpr = paramExprIter.hasNext() ? paramExprIter.next() : paramDecl.expr;

        // Evaluate expression -> value
        Object paramVal = eval(paramExpr);

        vals.put(paramName, paramVal);
        
      }
      
      //
      // Add rest of parameters (if requested)
      //
      
      if (allDecl != null) {
        
        Map<String, Object> otherParams = new LinkedHashMap<>();
        
        while (paramExprIter.hasNext()) {
          
          int paramIdx = paramExprIter.nextIndex();
          
          ExpressionContext paramExpr = paramExprIter.next();
          
          Object paramVal = eval(paramExpr);
          
          otherParams.put(Integer.toString(paramIdx), paramVal);
        }
        
        vals.put(allDecl.id.getText(), otherParams);
      }
      
    }
    else if (inv.namedParams != null) {

      //
      // Ensure legality of call
      //

      // Can only use positional or named; not both
      if (inv.posParams != null) {
        throw new InvocationException("only positional or named parameters are allowed", getLocation(inv));
      }

      //
      // Load parameters
      //

      List<NamedValueContext> namedParameters = new ArrayList<>(inv.namedParams.namedValues);
      Iterator<ParameterDeclContext> paramDeclIter = sig.paramDecls.iterator();
      
      ParameterDeclContext allDecl = null;

      while (paramDeclIter.hasNext()) {

        ParameterDeclContext paramDecl = paramDeclIter.next();
        
        if (paramDecl.flag != null && paramDecl.flag.getText().equals("*")) {
          allDecl = paramDecl;
          continue;
        }
        
        String paramName = name(paramDecl);

        // Find expression
        ExpressionContext paramExpr = findAndRemoveValue(namedParameters, paramName);

        // Assign default (is needed)
        paramExpr = paramExpr != null ? paramExpr : paramDecl.expr;

        // Evaluate expression -> value
        Object paramVal = eval(paramExpr);

        vals.put(paramName, paramVal);
        
      }
      
      //
      // Add rest of parameters (if requested)
      //
      
      if (allDecl != null) {
        
        Map<String, Object> otherParams = new LinkedHashMap<>();
        
        for (NamedValueContext namedValue : namedParameters) {
          
          String paramName = namedValue.name.getText();
          
          Object paramVal = eval(namedValue.expr);
          
          otherParams.put(paramName, paramVal);
          
        }

        vals.put(allDecl.id.getText(), otherParams);
      }
      

    }

    return vals;
  }
308913
private void checkOrInvokeValidStartMethod(final boolean invoke, final ClusterId clusterId) throws IllegalStateException {
        Method startMethod = null;
        for (final Method method : prototype.getClass().getDeclaredMethods()) {
            if (method.isAnnotationPresent(Start.class)) {
                if (startMethod != null)
                    throw new IllegalStateException("Multiple methods on the message processor of type\""
                            + SafeString.valueOf(prototype)
                            + "\" is identified as a Start method. Please annotate at most one method using @Start.");
                startMethod = method;
            }
        }

        // if the start method takes a ClusterId or ClusterDefinition then pass it.
        if (startMethod != null) {
            final Class<?>[] parameterTypes = startMethod.getParameterTypes();
            boolean takesClusterId = false;
            if (parameterTypes != null && parameterTypes.length == 1) {
                if (ClusterId.class.isAssignableFrom(parameterTypes[0]))
                    takesClusterId = true;
                else {
                    throw new IllegalStateException("The method \"" + startMethod.getName() + "\" on " + SafeString.objectDescription(prototype) +
                            " is annotated with the @" + Start.class.getSimpleName() + " annotation but doesn't have the correct signature. " +
                            "It needs to either take no parameters or take a single " + ClusterId.class.getSimpleName() + " parameter.");
                }
            } else if (parameterTypes != null && parameterTypes.length > 1) {
                throw new IllegalStateException("The method \"" + startMethod.getName() + "\" on " + SafeString.objectDescription(prototype) +
                        " is annotated with the @" + Start.class.getSimpleName() + " annotation but doesn't have the correct signature. " +
                        "It needs to either take no parameters or take a single " + ClusterId.class.getSimpleName() + " parameter.");
            }
            if (invoke) {
                try {
                    if (takesClusterId)
                        startMethod.invoke(prototype, clusterId);
                    else
                        startMethod.invoke(prototype);
                } catch (final Exception e) {
                    LOGGER.error(MarkerFactory.getMarker("FATAL"), "can't run MP initializer " + startMethod.getName(), e);
                }
            }
        }
    }
1163017
@Override
    @Trivial
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if ("addTransformer".equals(method.getName())) {
            addTransformer((ClassFileTransformer) args[0], args.length > 1 ? (Boolean) args[1] : false);
            return null;
        }
        if ("removeTransformer".equals(method.getName())) {
            return removeTransformer((ClassFileTransformer) args[0]);
        }
        if ("appendToBootstrapClassLoaderSearch".equals(method.getName())) {
            appendToBootstrapClassLoaderSearch((JarFile) args[0]);
            return null;
        }
        if ("appendToSystemClassLoaderSearch".equals(method.getName())) {
            appendToSystemClassLoaderSearch((JarFile) args[0]);
            return null;
        }
        if ("setNativeMethodPrefix".equals(method.getName())) {
            setNativeMethodPrefix((ClassFileTransformer) args[0], (String) args[1]);
            return null;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, method.getName(), args);
        }

        Object retValue = method.invoke(instrumentation, args);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            if (void.class == method.getReturnType()) {
                Tr.exit(tc, method.getName());
            } else {
                Tr.exit(tc, method.getName(), retValue);
            }
        }
        return retValue;
    }
386959
private InjectorMethod createInvoker(String invokeeName, String invokeeTypeName,
      boolean hasInvokee, boolean isNative, boolean isThrowing, String invokerMethodName,
      String invokerPackageName, int invokerParamCount, MethodLiteral<?, ?> method,
      String returnTypeString, boolean returning, boolean isLongAccess)
      throws NoSourceNameException {

    List<String> invokerSignatureParams = new ArrayList<String>(invokerParamCount);

    if (hasInvokee) {
      invokerSignatureParams.add(invokeeTypeName + " invokee");
    }

    List<String> invokeeCallParams = new ArrayList<String>(method.getParameterTypes().size());

    int paramCount = 0;
    for (Key<?> paramKey : method.getParameterKeys()) {
      String paramName = ReflectUtil.formatParameterName(paramCount);
      // We cannot use the type literal of the key here: It is canonicalized
      // during key creation, destroying some information, for example
      // auto-boxing any primitives. This leads to type-mismatches when calling
      // into JSNI. Instead we'll access the parameter's original type.
      TypeLiteral<?> paramLiteral = method.getParameterTypes().get(paramCount);
      invokerSignatureParams.add(ReflectUtil.getSourceName(paramLiteral) + " " + paramName);
      invokeeCallParams.add(paramName);
      paramCount++;
    }

    String annotation = isLongAccess ? "@com.google.gwt.core.client.UnsafeNativeLong " : "";

    String invokerSignature = annotation + "public " + (isNative ? "native " : "")
        + returnTypeString + " " + invokerMethodName + "(" + join(", ", invokerSignatureParams)
        + ")";

    return new InvokerMethod(hasInvokee, invokeeCallParams, invokeeTypeName, invokerPackageName,
        invokerSignature, isNative, isThrowing, method, returning, returnTypeString);
  }
1150409
public static Object invokeConstructor(Class<?> clazz, Object... args) {
    try {
      return InvokerHelper.invokeConstructorOf(clazz, args);
    } catch (InvokerInvocationException e) {
      ExceptionUtil.sneakyThrow(e.getCause());
      return null; // never reached
    }
  }