Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}

Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ final class PstmtCache extends LinkedHashMap<String, ExtendedPreparedStatement>
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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<String, ExtendedPreparedStatement> eldest) {
if (size() < maxSize) {
Expand Down
Loading