Interface StatementCacheListener


  • public interface StatementCacheListener
    Receive events related to caching PreparedStatements or CallableStatements. Used to log and diagnose affinity of the caches to its threads, connections and statements.
    • A new ThreadLocal StmtCacheMap is created when a prepare/callStatement request is from a new Thread.
    • A new StmtCache (StatementCache.PerConnectionCache) is created and cached in the StmtCacheMap by its Connection when the prepare/callStatement request encounters a new Connection.
    • The least recently used Prepared/CallableStatement will be evicted from the StmtCache if expired or StmtCache fills up to guard against Prepared/CallableStatements with concatenated criteria instead of using parameters.