Code example for ConcurrencyThrottleSupport

Methods: setConcurrencyLimit

0
 */ 
@SuppressWarnings("serial") 
public class ConcurrencyThrottleInterceptor extends ConcurrencyThrottleSupport
		implements MethodInterceptor, Serializable {
 
	public ConcurrencyThrottleInterceptor() { 
		setConcurrencyLimit(1);
	} 
 
	@Override 
	public Object invoke(MethodInvocation methodInvocation) throws Throwable {
		beforeAccess(); 
		try { 
			return methodInvocation.proceed();
		} 
		finally { 
			afterAccess(); 
		} 
	} 
 
Contextual code suggestions in your IDE  Get Codota for Java