public class StuckThreadDetectionValve extends ValveBase
Lifecycle.SingleUseasyncSupported, container, containerLog, nextmserverAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
StuckThreadDetectionValve()
Required to enable async support.
|
| Modifier and Type | Method and Description |
|---|---|
void |
backgroundProcess()
Execute a periodic task, such as reloading, etc.
|
long |
getInterruptedThreadsCount() |
int |
getInterruptThreadThreshold() |
int |
getStuckThreadCount() |
long[] |
getStuckThreadIds() |
java.lang.String[] |
getStuckThreadNames() |
int |
getThreshold() |
protected void |
initInternal()
Sub-classes wishing to perform additional initialization should override
this method, ensuring that super.initInternal() is the first call in the
overriding method.
|
void |
invoke(Request request,
Response response)
Perform request processing as required by this Valve.
|
void |
setInterruptThreadThreshold(int interruptThreadThreshold)
Specifies the threshold (in seconds) before stuck threads are interrupted.
|
void |
setThreshold(int threshold)
Specifies the threshold (in seconds) used when checking for stuck threads.
|
getContainer, getDomainInternal, getNext, getObjectNameKeyProperties, isAsyncSupported, setAsyncSupported, setContainer, setNext, startInternal, stopInternal, toStringdestroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregisteraddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stoppublic StuckThreadDetectionValve()
public void setThreshold(int threshold)
threshold - The new threshold in secondspublic int getThreshold()
setThreshold(int)public int getInterruptThreadThreshold()
public void setInterruptThreadThreshold(int interruptThreadThreshold)
interruptThreadThreshold - The new thread interruption threshold in secondsprotected void initInternal()
throws LifecycleException
LifecycleMBeanBaseinitInternal in class ValveBaseLifecycleException - If the initialisation failspublic void invoke(Request request, Response response) throws java.io.IOException, ServletException
Perform request processing as required by this Valve.
An individual Valve MAY perform the following actions, in the specified order:
getNext().invoke().
A Valve MUST NOT do any of the following things:
getNext().invoke() method has returned.
getNext().invoke() method has
returned.
request - The servlet request to be processedresponse - The servlet response to be createdjava.io.IOException - if an input/output error occurs, or is thrown
by a subsequently invoked Valve, Filter, or ServletServletException - if a servlet error occurs, or is thrown
by a subsequently invoked Valve, Filter, or Servletpublic void backgroundProcess()
ValveBasebackgroundProcess in interface ValvebackgroundProcess in class ValveBasepublic int getStuckThreadCount()
public long[] getStuckThreadIds()
public java.lang.String[] getStuckThreadNames()
public long getInterruptedThreadsCount()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.