Class OpenSslSessionCache

java.lang.Object
io.netty.handler.ssl.OpenSslSessionCache
All Implemented Interfaces:
io.netty.internal.tcnative.SSLSessionCache
Direct Known Subclasses:
OpenSslClientSessionCache

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

  • Constructor Details

  • Method Details

    • setSessionTimeout

      final void setSessionTimeout(int seconds)
    • getSessionTimeout

      final int getSessionTimeout()
    • sessionCreated

      protected boolean sessionCreated(OpenSslSessionCache.NativeSslSession session)
      Called once a new OpenSslInternalSession was created.
      Parameters:
      session - the new session.
      Returns:
      true if the session should be cached, false otherwise.
    • sessionRemoved

      protected void sessionRemoved(OpenSslSessionCache.NativeSslSession session)
      Called once an OpenSslInternalSession was removed from the cache.
      Parameters:
      session - the session to remove.
    • 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, 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.
    • notifyRemovalAndFree

      private void notifyRemovalAndFree(OpenSslSessionCache.NativeSslSession session)
    • getSession

      Return the OpenSslInternalSession which is cached for the given id.
    • getIds

      final 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*.