public class ConcurrencyThrottleInterceptor extends org.springframework.util.ConcurrencyThrottleSupport implements MethodInterceptor, Serializable
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.
ConcurrencyThrottleSupport.setConcurrencyLimit(int),
序列化表格| 构造器和说明 |
|---|
ConcurrencyThrottleInterceptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
invoke(MethodInvocation methodInvocation)
方法实现说明
|
public Object invoke(MethodInvocation methodInvocation) throws Throwable
MethodInterceptorinvoke 在接口中 MethodInterceptormethodInvocation - 主要实现类:ReflectiveMethodInvocationThrowable