Home / Function/ clearAndCancel() — netty Function Reference

clearAndCancel() — netty Function Reference

Architecture documentation for the clearAndCancel() function in Cache.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  49907d70_83f6_65fd_265c_73a9a8cba80a["clearAndCancel()"]
  0a5c7e5a_0868_706c_64ef_570d8eda93ed["Entries"]
  49907d70_83f6_65fd_265c_73a9a8cba80a -->|defined in| 0a5c7e5a_0868_706c_64ef_570d8eda93ed
  e3c71cae_ddf3_b42e_3a80_e3a9e5ed8673["clear()"]
  e3c71cae_ddf3_b42e_3a80_e3a9e5ed8673 -->|calls| 49907d70_83f6_65fd_265c_73a9a8cba80a
  bd693175_180f_1e1a_9d33_3ba960b9541f["run()"]
  bd693175_180f_1e1a_9d33_3ba960b9541f -->|calls| 49907d70_83f6_65fd_265c_73a9a8cba80a
  style 49907d70_83f6_65fd_265c_73a9a8cba80a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

resolver-dns/src/main/java/io/netty/resolver/dns/Cache.java lines 262–274

        boolean clearAndCancel() {
            List<E> entries = getAndSet(Collections.<E>emptyList());
            if (entries.isEmpty()) {
                return false;
            }

            ScheduledFuture<?> expirationFuture = FUTURE_UPDATER.getAndSet(this, CANCELLED);
            if (expirationFuture != null) {
                expirationFuture.cancel(false);
            }

            return true;
        }

Subdomains

Called By

Frequently Asked Questions

What does clearAndCancel() do?
clearAndCancel() is a function in the netty codebase, defined in resolver-dns/src/main/java/io/netty/resolver/dns/Cache.java.
Where is clearAndCancel() defined?
clearAndCancel() is defined in resolver-dns/src/main/java/io/netty/resolver/dns/Cache.java at line 262.
What calls clearAndCancel()?
clearAndCancel() is called by 2 function(s): clear, run.

Analyze Your Own Codebase

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

Try Supermodel Free