Package com.avoka.core.cayenne
Class ExecutionContext
java.lang.Object
com.avoka.core.cayenne.ExecutionContext
Provides the Execution Context utility.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.avoka.core.cayenne.ExecutionContext.QueryInfo
addQueryInfo
(String sql, long time) Record the query info.Return the query cache map.getQueryInfoDump
(boolean showDetails) Return the query info profiling dump.Return the query execution warning threshold in milliseconds.static ExecutionContext
Returns the thread execution context.boolean
boolean
boolean
boolean
Return true if query profiling is enabled.void
setAuditingEnabled
(boolean auditingEnabled) void
setCachingEnabled
(boolean cachingEnabled) void
setQueryCacheEnabled
(boolean queryCacheEnabled) void
setQueryProfilingEnable
(boolean queryProfilingEnabled) Set queryProfilingEnabled.void
Set the query execution warning threshold in milliseconds.static void
setThreadExecutionContext
(ExecutionContext executionContext) Sets the thread execution context.
-
Field Details
-
QUERY_CACHING
The Query Caching JVM argument key.- See Also:
-
QUERY_PROFILING
The Query Profiling JVM argument key.- See Also:
-
QUERY_PROFILING_DETAIL
The Query Profiling Detail JVM argument key.- See Also:
-
QUERY_PROFILING_THRESHOLD
The Query Profiling Warning Threshold JVM argument key.- See Also:
-
-
Constructor Details
-
ExecutionContext
public ExecutionContext()
-
-
Method Details
-
setThreadExecutionContext
Sets the thread execution context.- Parameters:
executionContext
- the new thread execution context
-
getThreadExecutionContext
Returns the thread execution context.- Returns:
- the thread execution context
-
isCachingEnabled
public boolean isCachingEnabled()- Returns:
- the cachingEnabled
-
setCachingEnabled
public void setCachingEnabled(boolean cachingEnabled) - Parameters:
cachingEnabled
- the cachingEnabled to set
-
isAuditingEnabled
public boolean isAuditingEnabled()- Returns:
- the auditingEnabled
-
setAuditingEnabled
public void setAuditingEnabled(boolean auditingEnabled) - Parameters:
auditingEnabled
- the auditingEnabled to set
-
isQueryCacheEnabled
public boolean isQueryCacheEnabled()- Returns:
- the queryCacheEnabled
- Since:
- 4.2.0
-
setQueryCacheEnabled
public void setQueryCacheEnabled(boolean queryCacheEnabled) - Parameters:
queryCacheEnabled
- the queryCacheEnabled to set- Since:
- 4.2.0
-
setQueryProfilingEnable
public void setQueryProfilingEnable(boolean queryProfilingEnabled) Set queryProfilingEnabled.- Parameters:
queryProfilingEnabled
- set queryProfilingEnabled- Since:
- 4.2.0
-
isQueryProfilingEnabled
public boolean isQueryProfilingEnabled()Return true if query profiling is enabled.- Returns:
- true if query profiling is enabled
- Since:
- 4.2.0
-
setQueryProfilingWarningThreshold
Set the query execution warning threshold in milliseconds.- Parameters:
value
- the query execution warning threshold in milliseconds- Since:
- 4.3.0
-
getQueryProfilingWarningThreshold
Return the query execution warning threshold in milliseconds.- Returns:
- the query execution warning threshold in milliseconds
- Since:
- 4.3.0
-
addQueryInfo
Record the query info.- Parameters:
sql
- the SQL query performedtime
- the time in ms to execute the query- Returns:
- the new QueryInfo object
- Since:
- 4.2.0
-
getQueryInfoDump
Return the query info profiling dump.- Parameters:
showDetails
- display SQL call details- Returns:
- the query info profiling dump.
- Since:
- 4.2.0
-
getQueryCacheMap
Return the query cache map.- Returns:
- the query cache map.
- Since:
- 4.2.0
-