diff --git a/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java b/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java index 5a6abe3..ce438ea 100644 --- a/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java +++ b/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java @@ -99,7 +99,6 @@ interface Heartbeat { private final long leakTimeMinutes; private final LongAdder pscHit = new LongAdder(); private final LongAdder pscMiss = new LongAdder(); - private final LongAdder pscPut = new LongAdder(); private final LongAdder pscRem = new LongAdder(); private final boolean shutdownOnJvmExit; @@ -165,7 +164,6 @@ private void init() { void pstmtCacheMetrics(PstmtCache pstmtCache) { pscHit.add(pstmtCache.hitCount()); pscMiss.add(pstmtCache.missCount()); - pscPut.add(pstmtCache.putCount()); pscRem.add(pstmtCache.removeCount()); } @@ -686,9 +684,9 @@ private void shutdownPool(boolean fullShutdown, boolean fromHook) { shutdownExecutor(); } if (fromHook) { - Log.info("DataSource [{0}] shutdown on JVM exit {1} psc[hit:{2} miss:{3} put:{4} rem:{5}]", name, status, pscHit, pscMiss, pscPut, pscRem); + Log.info("DataSource [{0}] shutdown on JVM exit {1} psc[hit:{2} miss:{3} rem:{4}]", name, status, pscHit, pscMiss, pscRem); } else { - Log.info("DataSource [{0}] shutdown {1} psc[hit:{2} miss:{3} put:{4} rem:{5}]", name, status, pscHit, pscMiss, pscPut, pscRem); + Log.info("DataSource [{0}] shutdown {1} psc[hit:{2} miss:{3} rem:{4}]", name, status, pscHit, pscMiss, pscRem); removeShutdownHook(); } } finally { diff --git a/ebean-datasource/src/main/java/io/ebean/datasource/pool/PstmtCache.java b/ebean-datasource/src/main/java/io/ebean/datasource/pool/PstmtCache.java index e232a06..d171e4a 100644 --- a/ebean-datasource/src/main/java/io/ebean/datasource/pool/PstmtCache.java +++ b/ebean-datasource/src/main/java/io/ebean/datasource/pool/PstmtCache.java @@ -15,7 +15,6 @@ final class PstmtCache extends LinkedHashMap private long removeCount; private long hitCount; private long missCount; - private long putCount; PstmtCache(int maxCacheSize) { // note = access ordered list. This is what gives it the LRU order @@ -53,10 +52,6 @@ long removeCount() { return removeCount; } - long putCount() { - return putCount; - } - /** * Try to add the returning statement to the cache. If there is already a * matching ExtendedPreparedStatement in the cache return false else add @@ -105,12 +100,6 @@ public ExtendedPreparedStatement remove(Object key) { return o; } - @Override - public ExtendedPreparedStatement put(String key, ExtendedPreparedStatement value) { - putCount++; - return super.put(key, value); - } - @Override protected boolean removeEldestEntry(Map.Entry eldest) { if (size() < maxSize) {