MCPcopy Create free account
hub / github.com/grpc/grpc-java / merge

Method merge

api/src/main/java/io/grpc/Metadata.java:507–517  ·  view source on GitHub ↗

Perform a simple merge of two sets of metadata. This is a purely additive operation, because a single key can be associated with multiple values.

(Metadata other)

Source from the content-addressed store, hash-verified

505 * values.
506 */
507 public void merge(Metadata other) {
508 if (other.isEmpty()) {
509 return;
510 }
511 int remaining = cap() - len();
512 if (isEmpty() || remaining < other.len()) {
513 expand(len() + other.len());
514 }
515 System.arraycopy(other.namesAndValues, 0, namesAndValues, len(), other.len());
516 size += other.size;
517 }
518
519 /**
520 * Merge values from the given set of keys into this set of metadata. If a key is present in keys,

Callers 15

basicStreamMethod · 0.95
updateHeadersMethod · 0.95
mergeExpandsMethod · 0.95
applyMethod · 0.95
interceptCallMethod · 0.95
onHeadersMethod · 0.95
buildEchoResponseMethod · 0.95
onErrorMethod · 0.95
interceptCallMethod · 0.95
checkedStartMethod · 0.45

Calls 15

isEmptyMethod · 0.95
capMethod · 0.95
lenMethod · 0.95
expandMethod · 0.95
maybeExpandMethod · 0.95
nameMethod · 0.95
valueMethod · 0.95
checkNotNullMethod · 0.80
asciiNameMethod · 0.80
containsKeyMethod · 0.80
sizeMethod · 0.65
putMethod · 0.65

Tested by 13

basicStreamMethod · 0.76
mergeExpandsMethod · 0.76
interceptCallMethod · 0.76
onHeadersMethod · 0.76
buildEchoResponseMethod · 0.76
interceptCallMethod · 0.76
parseMetadataMethod · 0.36
startMethod · 0.36
sendHeadersMethod · 0.36
rrFallbackMethod · 0.36