pushId() — netty Function Reference
Architecture documentation for the pushId() function in DnsQueryIdSpace.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 20a7aee7_30f1_992d_adbd_6eb3a0f5c471["pushId()"] 7fd57a0f_a8fa_aafd_24b0_9510d2efbadc["DnsQueryIdSpace"] 20a7aee7_30f1_992d_adbd_6eb3a0f5c471 -->|defined in| 7fd57a0f_a8fa_aafd_24b0_9510d2efbadc cf295d23_8f39_8124_5d0d_2b95f67a081b["pushId()"] cf295d23_8f39_8124_5d0d_2b95f67a081b -->|calls| 20a7aee7_30f1_992d_adbd_6eb3a0f5c471 cf295d23_8f39_8124_5d0d_2b95f67a081b["pushId()"] 20a7aee7_30f1_992d_adbd_6eb3a0f5c471 -->|calls| cf295d23_8f39_8124_5d0d_2b95f67a081b dc747dbe_ee06_49e5_5f1c_82af577c2f27["usableIds()"] 20a7aee7_30f1_992d_adbd_6eb3a0f5c471 -->|calls| dc747dbe_ee06_49e5_5f1c_82af577c2f27 fd1982cb_829b_d754_cf65_599769cf75b4["maxUsableIds()"] 20a7aee7_30f1_992d_adbd_6eb3a0f5c471 -->|calls| fd1982cb_829b_d754_cf65_599769cf75b4 style 20a7aee7_30f1_992d_adbd_6eb3a0f5c471 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryIdSpace.java lines 87–111
void pushId(int id) {
int bucketIdx = id / BUCKET_SIZE;
if (bucketIdx >= idBuckets.length) {
throw new IllegalArgumentException("id too large: " + id);
}
DnsQueryIdRange bucket = idBuckets[bucketIdx];
assert bucket != null;
bucket.pushId(id);
if (bucket.usableIds() == bucket.maxUsableIds()) {
// All ids are usable in this bucket. Let's check if there are other buckets left that have still
// some space left and if so drop this bucket.
for (int idx = 0; idx < idBuckets.length; idx++) {
if (idx != bucketIdx) {
DnsQueryIdRange otherBucket = idBuckets[idx];
if (otherBucket != null && otherBucket.usableIds() > BUCKET_DROP_THRESHOLD) {
// Drop bucket on the floor to reduce memory usage, there is another bucket left we can
// use that still has enough ids to use.
idBuckets[bucketIdx] = null;
return;
}
}
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does pushId() do?
pushId() is a function in the netty codebase, defined in resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryIdSpace.java.
Where is pushId() defined?
pushId() is defined in resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryIdSpace.java at line 87.
What does pushId() call?
pushId() calls 3 function(s): maxUsableIds, pushId, usableIds.
What calls pushId()?
pushId() is called by 1 function(s): pushId.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free