|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.interceptor.ConcurrencyThrottleInterceptor
public class ConcurrencyThrottleInterceptor
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).
Field Summary | |
---|---|
protected static Log |
logger
Static to avoid serializing the logger |
Constructor Summary | |
---|---|
ConcurrencyThrottleInterceptor()
|
Method Summary | |
---|---|
Object |
invoke(MethodInvocation methodInvocation)
|
void |
setConcurrencyLimit(int concurrencyLimit)
Set the maximum number of parallel invocations that this interceptor allows. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log logger
Constructor Detail |
---|
public ConcurrencyThrottleInterceptor()
Method Detail |
---|
public void setConcurrencyLimit(int concurrencyLimit)
public Object invoke(MethodInvocation methodInvocation) throws Throwable
invoke
in interface MethodInterceptor
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |