public class JamaThrottleInterceptor extends Object
org.springframework.aop.interceptor.ConcurrencyThrottleInterceptor
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_TIMEOUT_IN_MILLISECONDS |
static int |
DEFAULT_WAITING_LIMIT |
protected org.apache.log4j.Logger |
logger |
static int |
NO_CONCURRENCY |
static String |
NO_REQUEST_ALLOWED |
static String |
REQUEST_TIMED_OUT_WHILE_WAITING |
static String |
REQUEST_WAS_INTERRUPTED_WHILE_WAITING |
static String |
TOO_MANY_REQUESTS_ARE_WAITING |
static int |
UNBOUNDED_CONCURRENCY |
Constructor and Description |
---|
JamaThrottleInterceptor() |
Modifier and Type | Method and Description |
---|---|
void |
afterAccess() |
void |
beforeAccess() |
protected boolean |
exceedWaitingLimit() |
protected int |
getWaitingCount() |
protected void |
setConcurrencyCount(int concurrencyCount) |
void |
setConcurrencyLimit(int concurrencyLimit)
Set the maximum number of concurrent access attempts allowed.
|
void |
setTimeoutInMilliSeconds(long timeoutInMilliSeconds) |
protected void |
setWaitingCount(int waitingCount) |
void |
setWaitingLimit(int waitingLimit) |
protected boolean |
shouldTimeOut() |
public static final String TOO_MANY_REQUESTS_ARE_WAITING
public static final String REQUEST_TIMED_OUT_WHILE_WAITING
public static final String REQUEST_WAS_INTERRUPTED_WHILE_WAITING
public static final String NO_REQUEST_ALLOWED
public static final int UNBOUNDED_CONCURRENCY
public static final int NO_CONCURRENCY
public static final int DEFAULT_WAITING_LIMIT
public static final long DEFAULT_TIMEOUT_IN_MILLISECONDS
protected org.apache.log4j.Logger logger
public void setConcurrencyLimit(int concurrencyLimit)
public void beforeAccess()
public void afterAccess()
protected boolean exceedWaitingLimit()
protected boolean shouldTimeOut()
protected void setWaitingCount(int waitingCount)
protected int getWaitingCount()
public void setWaitingLimit(int waitingLimit)
public void setTimeoutInMilliSeconds(long timeoutInMilliSeconds)
protected void setConcurrencyCount(int concurrencyCount)
Copyright (c) 2013-2014 Jama Software, Inc. All Rights Reserved.