Fixes #2828 - AbstractHTTP2ServerConnectionFactory concurrent connect low performance.
Improved JMX for the HTTP2SessionContainer. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
d3e75c5936
commit
97a2f3bdf2
|
@ -252,7 +252,8 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne
|
|||
return new ServerParser(connector.getByteBufferPool(), listener, getMaxDynamicTableSize(), getHttpConfiguration().getRequestHeaderSize());
|
||||
}
|
||||
|
||||
private class HTTP2SessionContainer implements Connection.Listener, Dumpable
|
||||
@ManagedObject("The container of HTTP/2 sessions")
|
||||
public static class HTTP2SessionContainer implements Connection.Listener, Dumpable
|
||||
{
|
||||
private final Set<Session> sessions = ConcurrentHashMap.newKeySet();
|
||||
|
||||
|
@ -272,6 +273,12 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne
|
|||
LifeCycle.stop(session);
|
||||
}
|
||||
|
||||
@ManagedAttribute(value = "The number of HTTP/2 sessions", readonly = true)
|
||||
public int getSize()
|
||||
{
|
||||
return sessions.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String dump()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue