public abstract class AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter extends AbstractThrottledSubmissionHandlerInterceptorAdapter implements org.quartz.Job
Note, this class relies on an external method for decrementing the counts (i.e. a Quartz Job) and runs independent of the threshold of the parent.
logger| Constructor and Description |
|---|
AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
constructKey(javax.servlet.http.HttpServletRequest request)
Construct key to be used by the throttling agent to track requests.
|
void |
decrementCounts()
This class relies on an external configuration to clean it up.
|
protected boolean |
exceedsThreshold(javax.servlet.http.HttpServletRequest request)
Determine whether threshold has been exceeded.
|
void |
execute(org.quartz.JobExecutionContext jobExecutionContext) |
protected void |
recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
Record submission failure.
|
void |
scheduleThrottleJob()
Schedule throttle job.
|
afterPropertiesSet, getFailureRangeInSeconds, getFailureThreshold, getName, getThresholdRate, getUsernameParameter, postHandle, preHandle, recordThrottle, setFailureRangeInSeconds, setFailureThreshold, setUsernameParameter, toStringpublic AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter()
protected final boolean exceedsThreshold(javax.servlet.http.HttpServletRequest request)
AbstractThrottledSubmissionHandlerInterceptorAdapterexceedsThreshold in class AbstractThrottledSubmissionHandlerInterceptorAdapterrequest - the requestprotected final void recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
AbstractThrottledSubmissionHandlerInterceptorAdapterrecordSubmissionFailure in class AbstractThrottledSubmissionHandlerInterceptorAdapterrequest - the requestprotected abstract java.lang.String constructKey(javax.servlet.http.HttpServletRequest request)
request - the requestpublic final void decrementCounts()
@PostConstruct public void scheduleThrottleJob()
public void execute(org.quartz.JobExecutionContext jobExecutionContext)
throws org.quartz.JobExecutionException
execute in interface org.quartz.Joborg.quartz.JobExecutionException