orderedCopyOnInsert() — netty Function Reference
Architecture documentation for the orderedCopyOnInsert() function in DefaultAttributeMap.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 06e2906f_6470_6af3_c0b4_8b62aa0c0e87["orderedCopyOnInsert()"] bbb6a8bc_5354_cb1a_513e_c44f549e2d8f["DefaultAttributeMap"] 06e2906f_6470_6af3_c0b4_8b62aa0c0e87 -->|defined in| bbb6a8bc_5354_cb1a_513e_c44f549e2d8f c7821402_c1b3_d927_bcbd_43fa921be527["attr()"] c7821402_c1b3_d927_bcbd_43fa921be527 -->|calls| 06e2906f_6470_6af3_c0b4_8b62aa0c0e87 style 06e2906f_6470_6af3_c0b4_8b62aa0c0e87 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/DefaultAttributeMap.java lines 64–82
private static void orderedCopyOnInsert(DefaultAttribute[] sortedSrc, int srcLength, DefaultAttribute[] copy,
DefaultAttribute toInsert) {
// let's walk backward, because as a rule of thumb, toInsert.key.id() tends to be higher for new keys
final int id = toInsert.key.id();
int i;
for (i = srcLength - 1; i >= 0; i--) {
DefaultAttribute attribute = sortedSrc[i];
assert attribute.key.id() != id;
if (attribute.key.id() < id) {
break;
}
copy[i + 1] = sortedSrc[i];
}
copy[i + 1] = toInsert;
final int toCopy = i + 1;
if (toCopy > 0) {
System.arraycopy(sortedSrc, 0, copy, 0, toCopy);
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does orderedCopyOnInsert() do?
orderedCopyOnInsert() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/DefaultAttributeMap.java.
Where is orderedCopyOnInsert() defined?
orderedCopyOnInsert() is defined in common/src/main/java/io/netty/util/DefaultAttributeMap.java at line 64.
What calls orderedCopyOnInsert()?
orderedCopyOnInsert() is called by 1 function(s): attr.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free