| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private static class | |
| private static class | |
| private static enum | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentHashMap | activeThreads
The only references we keep to actual running Thread objects are in this Map (which is automatically cleaned in invoke()s finally clause). |
| private final Queue | |
| public static final int | |
| private final HttpHandler | |
| private final AtomicInteger | stuckCount
Keeps count of the number of stuck threads detected |
| private final Runnable | |
| private final int | threshold
In seconds. |
| private volatile XnioExecutor. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long[] | |
| public int | |
| public void | handleRequest(HttpServerExchange
the HTTP request/response exchange exchange)Implements io. Handle the request. |
| private void | notifyStuckThreadCompleted(StuckThreadDetectionHandler.
|
| private void | notifyStuckThreadDetected(StuckThreadDetectionHandler.
|
| public String |
| activeThreads | back to summary |
|---|---|
| private final ConcurrentHashMap<Long, StuckThreadDetectionHandler. The only references we keep to actual running Thread objects are in this Map (which is automatically cleaned in invoke()s finally clause). That way, Threads can be GC'ed, eventhough the Valve still thinks they are stuck (caused by a long monitor interval) | |
| completedStuckThreadsQueue | back to summary |
|---|---|
| private final Queue<StuckThreadDetectionHandler. | |
| DEFAULT_THRESHOLD | back to summary |
|---|---|
| public static final int DEFAULT_THRESHOLD | |
| next | back to summary |
|---|---|
| private final HttpHandler next | |
| stuckCount | back to summary |
|---|---|
| private final AtomicInteger stuckCount Keeps count of the number of stuck threads detected | |
| stuckThreadTask | back to summary |
|---|---|
| private final Runnable stuckThreadTask | |
| threshold | back to summary |
|---|---|
| private final int threshold In seconds. Default 600 (10 minutes). | |
| timerKey | back to summary |
|---|---|
| private volatile XnioExecutor. | |
| StuckThreadDetectionHandler | back to summary |
|---|---|
| public StuckThreadDetectionHandler(HttpHandler next) | |
| StuckThreadDetectionHandler | back to summary |
|---|---|
| public StuckThreadDetectionHandler(int threshold, HttpHandler next) | |
| getStuckThreadIds | back to summary |
|---|---|
| public long[] getStuckThreadIds() | |
| getThreshold | back to summary |
|---|---|
public int getThreshold()
| |
| handleRequest | back to summary |
|---|---|
| public void handleRequest(HttpServerExchange exchange) throws Exception Implements io. Doc from io. Handle the request.
| |
| notifyStuckThreadCompleted | back to summary |
|---|---|
| private void notifyStuckThreadCompleted(StuckThreadDetectionHandler. | |
| notifyStuckThreadDetected | back to summary |
|---|---|
| private void notifyStuckThreadDetected(StuckThreadDetectionHandler. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public HandlerWrapper | build(Map<String, Object>
The handler config config)Implements io. Creates the handler |
| public String | |
| public String | name()
Implements io. The string representation of the handler name. |
| public Map | parameters()
Implements io. Returns a map of parameters and their types. |
| public Set |
| Builder | back to summary |
|---|---|
| public Builder() | |
| build | back to summary |
|---|---|
| public HandlerWrapper build(Map<String, Object> config) Implements io. Doc from io. Creates the handler
| |
| defaultParameter | back to summary |
|---|---|
| public String defaultParameter() Implements io.
| |
| name | back to summary |
|---|---|
| public String name() Implements io. Doc from io. The string representation of the handler name. | |
| parameters | back to summary |
|---|---|
| public Map Implements io. Doc from io. Returns a map of parameters and their types.
| |
| requiredParameters | back to summary |
|---|---|
| public Set Implements io.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final String | |
| private final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public String | |
| public long |
| threadId | back to summary |
|---|---|
| private final long threadId | |
| threadName | back to summary |
|---|---|
| private final String threadName | |
| totalActiveTime | back to summary |
|---|---|
| private final long totalActiveTime | |
| CompletedStuckThread | back to summary |
|---|---|
| pack-priv CompletedStuckThread(Thread thread, long totalActiveTime) | |
| getId | back to summary |
|---|---|
| public long getId() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getTotalActiveTime | back to summary |
|---|---|
| public long getTotalActiveTime() | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final long | |
| private final AtomicInteger | |
| private final Thread | thread
Reference to the thread to get a stack trace from background task |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public String | |
| public Date | |
| public Thread | |
| pack-priv boolean | |
| public StuckThreadDetectionHandler. | |
| public boolean |
| requestUri | back to summary |
|---|---|
| private final String requestUri | |
| start | back to summary |
|---|---|
| private final long start | |
| state | back to summary |
|---|---|
| private final AtomicInteger state | |
| thread | back to summary |
|---|---|
| private final Thread thread Reference to the thread to get a stack trace from background task | |
| MonitoredThread | back to summary |
|---|---|
| pack-priv MonitoredThread(Thread thread, String requestUri) | |
| getActiveTimeInMillis | back to summary |
|---|---|
| public long getActiveTimeInMillis() | |
| getRequestUri | back to summary |
|---|---|
| public String getRequestUri() | |
| getStartTime | back to summary |
|---|---|
| public Date getStartTime() | |
| getThread | back to summary |
|---|---|
| public Thread getThread() | |
| isMarkedAsStuck | back to summary |
|---|---|
| pack-priv boolean isMarkedAsStuck() | |
| markAsDone | back to summary |
|---|---|
| public StuckThreadDetectionHandler. | |
| markAsStuckIfStillRunning | back to summary |
|---|---|
| public boolean markAsStuckIfStillRunning() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final StuckThreadDetectionHandler. | |
| public static final StuckThreadDetectionHandler. | |
| public static final StuckThreadDetectionHandler. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static StuckThreadDetectionHandler. | |
| public static StuckThreadDetectionHandler. |
| DONE | back to summary |
|---|---|
| public static final StuckThreadDetectionHandler. | |
| RUNNING | back to summary |
|---|---|
| public static final StuckThreadDetectionHandler. | |
| STUCK | back to summary |
|---|---|
| public static final StuckThreadDetectionHandler. | |
| MonitoredThreadState | back to summary |
|---|---|
| private MonitoredThreadState() | |
| valueOf | back to summary |
|---|---|
| public static StuckThreadDetectionHandler. | |
| values | back to summary |
|---|---|
| public static StuckThreadDetectionHandler. | |
| Modifier and Type | Field and Description |
|---|---|
| private final int |
| Modifier and Type | Method and Description |
|---|---|
| public HttpHandler |
| threshhold | back to summary |
|---|---|
| private final int threshhold | |
| Wrapper | back to summary |
|---|---|
| public Wrapper(int threshhold) | |
| Wrapper | back to summary |
|---|---|
| public Wrapper() | |
| wrap | back to summary |
|---|---|
| public HttpHandler wrap(HttpHandler handler) Implements io.
| |