- All Implemented Interfaces:
- Advice, Interceptor, MethodInterceptor, Serializable
- public class ConcurrencyThrottleInterceptor
- extends Object
- 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).
- Juergen Hoeller
- See Also:
- Serialized Form
protected static Log
Static to avoid serializing the logger
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected static final Log logger
- Static to avoid serializing the logger
public void setConcurrencyLimit(int concurrencyLimit)
- Set the maximum number of parallel invocations that this interceptor
allows. Default is 1 (having the same effect as a synchronized block).
public Object invoke(MethodInvocation methodInvocation)
- Specified by:
invoke in interface
Copyright (C) 2003-2004 The Spring Framework Project.