Class DefaultJdbiCacheStats

java.lang.Object
org.jdbi.v3.core.cache.internal.DefaultJdbiCacheStats

public final class DefaultJdbiCacheStats extends Object
Simple statistics for an DefaultJdbiCache instance. The values in this object are a snapshot of the cache status. Calling any method multiple times is cheap and constant time.
  • Field Details

    • cacheSize

      private final int cacheSize
    • maxSize

      private final int maxSize
  • Constructor Details

    • DefaultJdbiCacheStats

      DefaultJdbiCacheStats(int cacheSize, int maxSize)
  • Method Details

    • cacheSize

      public int cacheSize()
      Returns the current size of the cache.
      Returns:
      The current size of the cache.
    • maxSize

      public int maxSize()
      Returns the maximum size of the cache.
      Returns:
      The maximum size of the cache.