org.apache.catalina.valves
Class StuckThreadDetectionValve
java.lang.Object
org.apache.catalina.valves.ValveBase
org.apache.catalina.valves.StuckThreadDetectionValve
- All Implemented Interfaces:
- javax.management.MBeanRegistration, Contained, Valve
public class StuckThreadDetectionValve
- extends ValveBase
This valve allows to detect requests that take a long time to process, which
might indicate that the thread that is processing it is stuck.
Methods inherited from class org.apache.catalina.valves.ValveBase |
createObjectName, event, getContainer, getContainerName, getController, getDomain, getInfo, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setNext, setObjectName, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StuckThreadDetectionValve
public StuckThreadDetectionValve()
setThreshold
public void setThreshold(int threshold)
- Specify the threshold (in seconds) used when checking for stuck threads.
If <=0, the detection is disabled. The default is 600 seconds.
- Parameters:
threshold
- The new threshold in seconds
getThreshold
public int getThreshold()
- Returns:
- The current threshold in seconds
- See Also:
setThreshold(int)
invoke
public void invoke(Request request,
Response response)
throws java.io.IOException,
javax.servlet.ServletException
- The implementation-specific logic represented by this Valve. See the
Valve description for the normal design patterns for this method.
This method MUST be provided by a subclass.
- Specified by:
invoke
in interface Valve
- Specified by:
invoke
in class ValveBase
- Parameters:
request
- The servlet request to be processedresponse
- The servlet response to be created
- Throws:
java.io.IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a servlet error occurs
backgroundProcess
public void backgroundProcess()
- Description copied from class:
ValveBase
- Execute a periodic task, such as reloading, etc. This method will be
invoked inside the classloading context of this container. Unexpected
throwables will be caught and logged.
- Specified by:
backgroundProcess
in interface Valve
- Overrides:
backgroundProcess
in class ValveBase
getStuckThreadIds
public long[] getStuckThreadIds()
getStuckThreadNames
public java.lang.String[] getStuckThreadNames()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.