rebuildActiveExecutors() — netty Function Reference
Architecture documentation for the rebuildActiveExecutors() function in AutoScalingEventExecutorChooserFactory.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c54d4b63_d04e_6ce4_af65_d57b7c4c37f3["rebuildActiveExecutors()"] d9aa57c9_e2b2_7790_035b_2a28f5df0c47["UtilizationMonitor"] c54d4b63_d04e_6ce4_af65_d57b7c4c37f3 -->|defined in| d9aa57c9_e2b2_7790_035b_2a28f5df0c47 0051a9bb_2eac_9138_da01_67fb084baff0["run()"] 0051a9bb_2eac_9138_da01_67fb084baff0 -->|calls| c54d4b63_d04e_6ce4_af65_d57b7c4c37f3 0ad7a22b_c606_581b_a4ef_ecd45fd409ef["AutoScalingState()"] c54d4b63_d04e_6ce4_af65_d57b7c4c37f3 -->|calls| 0ad7a22b_c606_581b_a4ef_ecd45fd409ef style c54d4b63_d04e_6ce4_af65_d57b7c4c37f3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/concurrent/AutoScalingEventExecutorChooserFactory.java lines 397–418
private void rebuildActiveExecutors() {
for (;;) {
AutoScalingState oldState = state.get();
List<EventExecutor> active = new ArrayList<>(oldState.activeChildrenCount);
for (EventExecutor executor : executors) {
if (!executor.isSuspended()) {
active.add(executor);
}
}
EventExecutor[] newActiveExecutors = active.toArray(new EventExecutor[0]);
// If the number of active executors in our scan differs from the count in the state,
// another thread likely changed it. We use the count from our fresh scan.
// The nextWakeUpIndex is preserved from the old state as this rebuild is not a scale-up action.
AutoScalingState newState = new AutoScalingState(
newActiveExecutors.length, oldState.nextWakeUpIndex, newActiveExecutors);
if (state.compareAndSet(oldState, newState)) {
break;
}
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does rebuildActiveExecutors() do?
rebuildActiveExecutors() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/AutoScalingEventExecutorChooserFactory.java.
Where is rebuildActiveExecutors() defined?
rebuildActiveExecutors() is defined in common/src/main/java/io/netty/util/concurrent/AutoScalingEventExecutorChooserFactory.java at line 397.
What does rebuildActiveExecutors() call?
rebuildActiveExecutors() calls 1 function(s): AutoScalingState.
What calls rebuildActiveExecutors()?
rebuildActiveExecutors() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free