Home / Function/ notifyListenersNow() — netty Function Reference

notifyListenersNow() — netty Function Reference

Architecture documentation for the notifyListenersNow() function in DefaultPromise.java from the netty codebase.

Function java CommonUtil Concurrent calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  cc9ae68c_24a7_07de_3637_ca681cc4b97f["notifyListenersNow()"]
  a0080a71_f091_42e0_8a20_424f0bf9d34a["DefaultPromise"]
  cc9ae68c_24a7_07de_3637_ca681cc4b97f -->|defined in| a0080a71_f091_42e0_8a20_424f0bf9d34a
  00513e87_934e_6633_22ee_a4fb405c640f["notifyListeners()"]
  00513e87_934e_6633_22ee_a4fb405c640f -->|calls| cc9ae68c_24a7_07de_3637_ca681cc4b97f
  8f88ad04_0acd_d483_f263_48a343c14b45["notifyListener0()"]
  cc9ae68c_24a7_07de_3637_ca681cc4b97f -->|calls| 8f88ad04_0acd_d483_f263_48a343c14b45
  8d347e1e_c85a_2fbf_ef7c_f6a27604e95b["notifyListeners0()"]
  cc9ae68c_24a7_07de_3637_ca681cc4b97f -->|calls| 8d347e1e_c85a_2fbf_ef7c_f6a27604e95b
  style cc9ae68c_24a7_07de_3637_ca681cc4b97f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/concurrent/DefaultPromise.java lines 552–591

    private void notifyListenersNow() {
        GenericFutureListener listener;
        DefaultFutureListeners listeners;
        synchronized (this) {
            listener = this.listener;
            listeners = this.listeners;
            // Only proceed if there are listeners to notify and we are not already notifying listeners.
            if (notifyingListeners || (listener == null && listeners == null)) {
                return;
            }
            notifyingListeners = true;
            if (listener != null) {
                this.listener = null;
            } else {
                this.listeners = null;
            }
        }
        for (;;) {
            if (listener != null) {
                notifyListener0(this, listener);
            } else {
                notifyListeners0(listeners);
            }
            synchronized (this) {
                if (this.listener == null && this.listeners == null) {
                    // Nothing can throw from within this method, so setting notifyingListeners back to false does not
                    // need to be in a finally block.
                    notifyingListeners = false;
                    return;
                }
                listener = this.listener;
                listeners = this.listeners;
                if (listener != null) {
                    this.listener = null;
                } else {
                    this.listeners = null;
                }
            }
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does notifyListenersNow() do?
notifyListenersNow() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/DefaultPromise.java.
Where is notifyListenersNow() defined?
notifyListenersNow() is defined in common/src/main/java/io/netty/util/concurrent/DefaultPromise.java at line 552.
What does notifyListenersNow() call?
notifyListenersNow() calls 2 function(s): notifyListener0, notifyListeners0.
What calls notifyListenersNow()?
notifyListenersNow() is called by 1 function(s): notifyListeners.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free