Expose Metadata.size
He-Pin opened this issue · 3 comments
He-Pin commented
Motivication:
I want to get the metadata's size, but currently I can only get it with metadata#keys#size
, access it directly will reduce some overhead.
NOTE:
It was reverted in PR: #3008
My currently usage:
//https://github.com/grpc/grpc-java/pull/3008
if (!headersSent && !extraHeaders.keys().isEmpty()) {
//trailers.merge(extraHeaders);
sendHeaders(new Metadata());
}