Package org.apache.openjpa.kernel
Interface QueryStatistics<T>
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractQueryCache.Default,QueryStatistics.Default,QueryStatistics.None
Records query execution statistics.
Statistics can be reset.
Gathers both accumulated statistics since start as well as statistics since
last reset.
- Since:
- 1.3.0
- Author:
- Pinaki Poddar
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA default implementation.static classA do-nothing implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all statistics accumulated since start.voiddump(PrintStream out) Dumps on the given output stream.longGets number of total query evictions since last reset.longGets number of total query execution since last reset.longgetExecutionCount(T query) Gets number of executions for the given query since last reset.longGets number of total query execution that are cached since last reset.longgetHitCount(T query) Gets number of executions for the given query that are cached since last reset.longGets number of total query evictions since start.longGets number of total query execution since start.longgetTotalExecutionCount(T query) Gets number of executions for the given query since start.longGets number of total query execution that are cached since start.longgetTotalHitCount(T query) Gets number of executions for the given query that are cached since start.keys()Gets all the identifier keys for the cached queries.voidrecordEviction(T query) Record that the given query has been evicted.voidrecordExecution(T query) Record that the given query has been executed.voidreset()Clears all statistics accumulated since last reset.since()Gets the time of last reset.start()Gets the time of start.
-
Method Details
-
keys
Gets all the identifier keys for the cached queries. -
recordExecution
Record that the given query has been executed. -
recordEviction
Record that the given query has been evicted. -
getExecutionCount
long getExecutionCount()Gets number of total query execution since last reset. -
getTotalExecutionCount
long getTotalExecutionCount()Gets number of total query execution since start. -
getExecutionCount
Gets number of executions for the given query since last reset. -
getTotalExecutionCount
Gets number of executions for the given query since start. -
getHitCount
long getHitCount()Gets number of total query execution that are cached since last reset. -
getTotalHitCount
long getTotalHitCount()Gets number of total query execution that are cached since start. -
getHitCount
Gets number of executions for the given query that are cached since last reset. -
getTotalHitCount
Gets number of executions for the given query that are cached since start. -
getEvictionCount
long getEvictionCount()Gets number of total query evictions since last reset. -
getTotalEvictionCount
long getTotalEvictionCount()Gets number of total query evictions since start. -
since
Date since()Gets the time of last reset. -
start
Date start()Gets the time of start. -
reset
void reset()Clears all statistics accumulated since last reset. -
clear
void clear()Clears all statistics accumulated since start. -
dump
Dumps on the given output stream.
-