org.springframework.aop.interceptor

## 类 ConcurrencyThrottleInterceptor

- java.lang.Object
- - org.springframework.util.ConcurrencyThrottleSupport
  - - org.springframework.aop.interceptor.ConcurrencyThrottleInterceptor

- 所有已实现的接口:
    Serializable, Advice, Interceptor, MethodInterceptor

      public class ConcurrencyThrottleInterceptor
      extends org.springframework.util.ConcurrencyThrottleSupport
      implements MethodInterceptor, Serializable

  Interceptor that throttles concurrent access, blocking invocations if a specified concurrency limit is reached.

  Can be applied to methods of local services that involve heavy use of system resources, in a scenario where it is more efficient to throttle concurrency for a specific service rather than restricting the entire thread pool (e.g. the web container's thread pool).

  The default concurrency limit of this interceptor is 1. Specify the "concurrencyLimit" bean property to change this value.

  从以下版本开始:
    11.02.2004
  作者:
    Juergen Hoeller
  另请参阅:
    `ConcurrencyThrottleSupport.setConcurrencyLimit(int)`, 序列化表格

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.util.ConcurrencyThrottleSupport

      `logger, NO_CONCURRENCY, UNBOUNDED_CONCURRENCY`

  - ### 构造器概要

    构造器
    构造器和说明
    `ConcurrencyThrottleInterceptor()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | `invoke(MethodInvocation methodInvocation)` 方法实现说明

    - ### 从类继承的方法 org.springframework.util.ConcurrencyThrottleSupport

      `afterAccess, beforeAccess, getConcurrencyLimit, isThrottleActive, setConcurrencyLimit`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### ConcurrencyThrottleInterceptor

          public ConcurrencyThrottleInterceptor()

  - ### 方法详细资料

    - #### invoke

          public Object invoke(MethodInvocation methodInvocation)
                        throws Throwable

      从接口复制的说明: `MethodInterceptor`
      方法实现说明
      指定者:
        `invoke` 在接口中 `MethodInterceptor`
      参数:
        `methodInvocation` - 主要实现类:ReflectiveMethodInvocation
      抛出:
        `Throwable`