Interface StatementCacheMBean
- All Known Implementing Classes:
StatementCache
public interface StatementCacheMBean
MBean interface for monitoring the statement cache.
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of statements currently held in the statement cache, counted across all connections that belong to the same connection pool - the value themaxlimit is compared against.intReturns the cache size for the current connection.intReturns the maximum size of the statement cache.booleanChecks if callable statements are being cached.booleanChecks if prepared statements are being cached.
-
Method Details
-
isCachePrepared
boolean isCachePrepared()Checks if prepared statements are being cached.- Returns:
- true if prepared statement caching is enabled
-
isCacheCallable
boolean isCacheCallable()Checks if callable statements are being cached.- Returns:
- true if callable statement caching is enabled
-
getMaxCacheSize
int getMaxCacheSize()Returns the maximum size of the statement cache.- Returns:
- maximum cache size
-
getCacheSize
int getCacheSize()Returns the number of statements currently held in the statement cache, counted across all connections that belong to the same connection pool - the value themaxlimit is compared against. The number is a snapshot of the pool's accounting at the moment of the read; it is not a handle that can be used to change that accounting.- Returns:
- the number of cached statements, or
-1if this interceptor instance is not bound to a pooled connection
-
getCacheSizePerConnection
int getCacheSizePerConnection()Returns the cache size for the current connection.- Returns:
- number of cached statements for this connection
-