add() — netty Function Reference
Architecture documentation for the add() function in PromiseAggregator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5a56e02e_c075_5b73_12f6_4f7aa203d9cb["add()"] 6b255acd_4eb0_e639_6bd9_6e6d0998b4aa["PromiseAggregator"] 5a56e02e_c075_5b73_12f6_4f7aa203d9cb -->|defined in| 6b255acd_4eb0_e639_6bd9_6e6d0998b4aa style 5a56e02e_c075_5b73_12f6_4f7aa203d9cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/concurrent/PromiseAggregator.java lines 63–88
@SafeVarargs
public final PromiseAggregator<V, F> add(Promise<V>... promises) {
ObjectUtil.checkNotNull(promises, "promises");
if (promises.length == 0) {
return this;
}
synchronized (this) {
if (pendingPromises == null) {
int size;
if (promises.length > 1) {
size = promises.length;
} else {
size = 2;
}
pendingPromises = new LinkedHashSet<Promise<V>>(size);
}
for (Promise<V> p : promises) {
if (p == null) {
continue;
}
pendingPromises.add(p);
p.addListener(this);
}
}
return this;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does add() do?
add() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/PromiseAggregator.java.
Where is add() defined?
add() is defined in common/src/main/java/io/netty/util/concurrent/PromiseAggregator.java at line 63.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free