Interface QueryStatistics<T>

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    AbstractQueryCache.Default, QueryStatistics.Default, QueryStatistics.None

    public interface QueryStatistics<T>
    extends java.io.Serializable
    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
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Clears all statistics accumulated since start.
      void dump​(java.io.PrintStream out)
      Dumps on the given output stream.
      long getEvictionCount()
      Gets number of total query evictions since last reset.
      long getExecutionCount()
      Gets number of total query execution since last reset.
      long getExecutionCount​(T query)
      Gets number of executions for the given query since last reset.
      long getHitCount()
      Gets number of total query execution that are cached since last reset.
      long getHitCount​(T query)
      Gets number of executions for the given query that are cached since last reset.
      long getTotalEvictionCount()
      Gets number of total query evictions since start.
      long getTotalExecutionCount()
      Gets number of total query execution since start.
      long getTotalExecutionCount​(T query)
      Gets number of executions for the given query since start.
      long getTotalHitCount()
      Gets number of total query execution that are cached since start.
      long getTotalHitCount​(T query)
      Gets number of executions for the given query that are cached since start.
      java.util.Set<T> keys()
      Gets all the identifier keys for the cached queries.
      void recordEviction​(T query)
      Record that the given query has been evicted.
      void recordExecution​(T query)
      Record that the given query has been executed.
      void reset()
      Clears all statistics accumulated since last reset.
      java.util.Date since()
      Gets the time of last reset.
      java.util.Date start()
      Gets the time of start.
    • Method Detail

      • keys

        java.util.Set<T> keys()
        Gets all the identifier keys for the cached queries.
      • recordExecution

        void recordExecution​(T query)
        Record that the given query has been executed.
      • recordEviction

        void recordEviction​(T query)
        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

        long getExecutionCount​(T query)
        Gets number of executions for the given query since last reset.
      • getTotalExecutionCount

        long getTotalExecutionCount​(T query)
        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

        long getHitCount​(T query)
        Gets number of executions for the given query that are cached since last reset.
      • getTotalHitCount

        long getTotalHitCount​(T query)
        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

        java.util.Date since()
        Gets the time of last reset.
      • start

        java.util.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

        void dump​(java.io.PrintStream out)
        Dumps on the given output stream.