Jetty 12.0.x h2c perf improvement: implement equals/hashcode in Stream (#9077)
implement equals/hashcode in H2Stream Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
1dc175efac
commit
f14c0a5002
|
@ -28,7 +28,6 @@ import java.util.Map;
|
|||
import java.util.Queue;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
@ -84,7 +83,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements Session
|
|||
{
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HTTP2Session.class);
|
||||
|
||||
private final ConcurrentMap<Integer, HTTP2Stream> streams = new ConcurrentHashMap<>();
|
||||
private final Map<Integer, HTTP2Stream> streams = new ConcurrentHashMap<>();
|
||||
private final AtomicLong streamsOpened = new AtomicLong();
|
||||
private final AtomicLong streamsClosed = new AtomicLong();
|
||||
private final StreamsState streamsState = new StreamsState();
|
||||
|
|
|
@ -99,6 +99,18 @@ public class HTTP2Stream implements Stream, Attachable, Closeable, Callback, Dum
|
|||
return streamId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
return this == o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return streamId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getAttachment()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue