public class QueryTimeoutEvent extends QueryEvent implements DurationAwareEvent
QueryTimeoutEvent indicates that one of the application queries
has been running for more than the maximum allowed time threshold,
which is given by the Config.Property.Query.TIMEOUT_MILLIS property value.
Long-running queries should be avoided because they impact user experience,
consume resources, and prevent other concurrent requests from using the acquired resources (e.g., database connections).Event.Priority| Constructor and Description |
|---|
QueryTimeoutEvent(String queryString,
long queryTimeNanos)
Instantiate the event using the provided parameters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
|
long |
getDurationMillis()
Get the duration, in milliseconds, associated with this
Event. |
Event.Priority |
getPriority()
Get the
Event.Priority of this Event |
long |
getQueryTimeMillis()
Get the execution time of the JPA or Hibernate query in milliseconds.
|
long |
getQueryTimeNanos()
Get the execution time of the JPA or Hibernate query in nanoseconds.
|
getQueryStringgetInfoUrlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInfoUrlpublic QueryTimeoutEvent(String queryString, long queryTimeNanos)
queryString - query stringqueryTimeNanos - query execution timepublic long getQueryTimeNanos()
public long getQueryTimeMillis()
public long getDurationMillis()
Event.getDurationMillis in interface DurationAwareEventEventpublic Event.Priority getPriority()
Event.Priority of this EventgetPriority in interface EventEvent.Priority of this Eventpublic String getDescription()
getDescription in interface EventString description of this EventCopyright © 2026. All rights reserved.