put() — netty Function Reference
Architecture documentation for the put() function in LongLongHashMap.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD de2b9bd8_a556_f190_a2d4_14bd57210f3c["put()"] c69e9be2_01e3_83a0_b7d7_e4e8841e7bf8["LongLongHashMap"] de2b9bd8_a556_f190_a2d4_14bd57210f3c -->|defined in| c69e9be2_01e3_83a0_b7d7_e4e8841e7bf8 09c316c3_bddf_b4f7_c3e8_69e3d1f83500["expand()"] 09c316c3_bddf_b4f7_c3e8_69e3d1f83500 -->|calls| de2b9bd8_a556_f190_a2d4_14bd57210f3c d26bef1b_480a_bce1_986c_ff9e97408cb9["index()"] de2b9bd8_a556_f190_a2d4_14bd57210f3c -->|calls| d26bef1b_480a_bce1_986c_ff9e97408cb9 09c316c3_bddf_b4f7_c3e8_69e3d1f83500["expand()"] de2b9bd8_a556_f190_a2d4_14bd57210f3c -->|calls| 09c316c3_bddf_b4f7_c3e8_69e3d1f83500 style de2b9bd8_a556_f190_a2d4_14bd57210f3c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/internal/LongLongHashMap.java lines 45–74
public long put(long key, long value) {
if (key == 0) {
long prev = zeroVal;
zeroVal = value;
return prev;
}
for (;;) {
int index = index(key);
for (int i = 0; i < maxProbe; i++) {
long existing = array[index];
if (existing == key || existing == 0) {
long prev = existing == 0? emptyVal : array[index + 1];
array[index] = key;
array[index + 1] = value;
for (; i < maxProbe; i++) { // Nerf any existing misplaced entries.
index = index + 2 & mask;
if (array[index] == key) {
array[index] = 0;
prev = array[index + 1];
break;
}
}
return prev;
}
index = index + 2 & mask;
}
expand(); // Grow array and re-hash.
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does put() do?
put() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/LongLongHashMap.java.
Where is put() defined?
put() is defined in common/src/main/java/io/netty/util/internal/LongLongHashMap.java at line 45.
What does put() call?
put() calls 2 function(s): expand, index.
What calls put()?
put() is called by 1 function(s): expand.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free