From 2ed89cbccdf694b79aa831ea90ea3c46994b5b8b Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Wed, 9 Sep 2020 10:24:31 +1000 Subject: [PATCH] Issue #5246 - add Inflater/Deflater pools to server dump Signed-off-by: Lachlan Roberts --- .../jetty/util/compression/CompressionPool.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/compression/CompressionPool.java b/jetty-util/src/main/java/org/eclipse/jetty/util/compression/CompressionPool.java index 9e3634aa273..5552dbaa9b4 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/compression/CompressionPool.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/compression/CompressionPool.java @@ -134,4 +134,15 @@ public abstract class CompressionPool extends AbstractLifeCycle } _numObjects.set(0); } + + @Override + public String toString() + { + return String.format("%s@%x{%s,size=%d,capacity=%s}", + getClass().getSimpleName(), + hashCode(), + getState(), + _pool.size(), + _capacity < 0 ? "UNLIMITED" : _capacity); + } }