ServerStats
How much a CoapServer holds at the moment CoapServer.stats was called, for gauges in metrics and for diagnostics; set each against the bound of CoapServerConfig it names. What its endpoint holds is CoapEndpoint.stats(), and what happened is counted from its EndpointEvents.
Reading costs no lock: the server writes these counts as it changes them, so CoapServer.stats can be called from any thread at any rate, and two values may be from moments a few requests apart.
Properties
the Block1 request bodies being assembled (RFC 7959 §2.5), at most CoapServerConfig.maxConcurrentTransfers; one that expired after EXCHANGE_LIFETIME may count until the next transfer starts.
the response bodies kept for their later Block2 blocks (RFC 7959 §2.4), bounded and expiring like block1Transfers.
the observers registered on all resources (RFC 7641 §4.1), at most CoapServerConfig.maxObservers.
the Q-Block1 request bodies being assembled (RFC 9177 §4.3), at most QBlockServerConfig.maxPartialBodies.
the Q-Block2 response bodies kept for Continues and requests of missing blocks, or still sending their sets (RFC 9177 §4.4), at most twice QBlockServerConfig.maxCachedBodies.