Class OpenSslSessionCache

  • All Implemented Interfaces:
    io.netty.internal.tcnative.SSLSessionCache
    Direct Known Subclasses:
    OpenSslClientSessionCache

    class OpenSslSessionCache
    extends java.lang.Object
    implements io.netty.internal.tcnative.SSLSessionCache
    SSLSessionCache implementation for our native SSL implementation.
    • Field Detail

      • DEFAULT_CACHE_SIZE

        private static final int DEFAULT_CACHE_SIZE
      • maximumCacheSize

        private final java.util.concurrent.atomic.AtomicInteger maximumCacheSize
      • sessionTimeout

        private final java.util.concurrent.atomic.AtomicInteger sessionTimeout
      • sessionCounter

        private int sessionCounter
    • Constructor Detail

    • Method Detail

      • setSessionTimeout

        final void setSessionTimeout​(int seconds)
      • getSessionTimeout

        final int getSessionTimeout()
      • setSessionCacheSize

        final void setSessionCacheSize​(int size)
      • getSessionCacheSize

        final int getSessionCacheSize()
      • expungeInvalidSessions

        private void expungeInvalidSessions()
      • sessionCreated

        public boolean sessionCreated​(long ssl,
                                      long sslSession)
        Specified by:
        sessionCreated in interface io.netty.internal.tcnative.SSLSessionCache
      • getSession

        public final long getSession​(long ssl,
                                     byte[] sessionId)
        Specified by:
        getSession in interface io.netty.internal.tcnative.SSLSessionCache
      • setSession

        boolean setSession​(long ssl,
                           OpenSslInternalSession session,
                           java.lang.String host,
                           int port)
      • removeSessionWithId

        final void removeSessionWithId​(OpenSslSessionId id)
        Remove the session with the given id from the cache
      • containsSessionWithId

        final boolean containsSessionWithId​(OpenSslSessionId id)
        Returns true if there is a session for the given id in the cache.
      • getIds

        final java.util.List<OpenSslSessionId> getIds()
        Returns a snapshot of the session ids of the current valid sessions.
      • clear

        void clear()
        Clear the cache and free all cached SSL_SESSION*.