Home / Function/ expungeInvalidSessions() — netty Function Reference

expungeInvalidSessions() — netty Function Reference

Architecture documentation for the expungeInvalidSessions() function in QuicClientSessionCache.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  40aee01c_40f0_656b_4271_003bc6cf9723["expungeInvalidSessions()"]
  5d182568_b440_b59f_55b6_3e43b2f435b4["QuicClientSessionCache"]
  40aee01c_40f0_656b_4271_003bc6cf9723 -->|defined in| 5d182568_b440_b59f_55b6_3e43b2f435b4
  ba7e5416_0084_c6b3_614e_77129ef7aa52["saveSession()"]
  ba7e5416_0084_c6b3_614e_77129ef7aa52 -->|calls| 40aee01c_40f0_656b_4271_003bc6cf9723
  0286cf2d_573d_e88b_d00f_89dc5179c2bc["isValid()"]
  40aee01c_40f0_656b_4271_003bc6cf9723 -->|calls| 0286cf2d_573d_e88b_d00f_89dc5179c2bc
  style 40aee01c_40f0_656b_4271_003bc6cf9723 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicClientSessionCache.java lines 151–169

    private void expungeInvalidSessions() {
        assert Thread.holdsLock(sessions);

        if (sessions.isEmpty()) {
            return;
        }
        long now = System.currentTimeMillis();
        Iterator<Map.Entry<HostPort, SessionHolder>> iterator = sessions.entrySet().iterator();
        while (iterator.hasNext()) {
            SessionHolder sessionHolder = iterator.next().getValue();
            // As we use a LinkedHashMap we can break the while loop as soon as we find a valid session.
            // This is true as we always drain the cache as soon as we change the timeout to a smaller value as
            // it was set before. This way its true that the insertion order matches the timeout order.
            if (sessionHolder.isValid(now)) {
                break;
            }
            iterator.remove();
        }
    }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does expungeInvalidSessions() do?
expungeInvalidSessions() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicClientSessionCache.java.
Where is expungeInvalidSessions() defined?
expungeInvalidSessions() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicClientSessionCache.java at line 151.
What does expungeInvalidSessions() call?
expungeInvalidSessions() calls 1 function(s): isValid.
What calls expungeInvalidSessions()?
expungeInvalidSessions() is called by 1 function(s): saveSession.

Analyze Your Own Codebase

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

Try Supermodel Free