Class ClusterLettuceSessionStore

  • All Implemented Interfaces:
    com.aspectran.core.component.Component, com.aspectran.core.component.session.SessionStore

    public class ClusterLettuceSessionStore
    extends AbstractLettuceSessionStore
    A Redis-based session store using Lettuce as the client.

    Created: 2019/12/06

    Since:
    6.6.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ClusterLettuceSessionStore​(ConnectionPool<io.lettuce.core.cluster.api.StatefulRedisClusterConnection<java.lang.String,​com.aspectran.core.component.session.SessionData>> pool)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean delete​(java.lang.String id)  
      protected void doDestroy()  
      protected void doInitialize()  
      void doSave​(java.lang.String id, com.aspectran.core.component.session.SessionData data)  
      boolean exists​(java.lang.String id)  
      com.aspectran.core.component.session.SessionData load​(java.lang.String id)  
      void scan​(java.util.function.Consumer<com.aspectran.core.component.session.SessionData> func)  
      • Methods inherited from class com.aspectran.core.component.session.AbstractSessionStore

        checkAlreadyInitialized, getExpired, getGracePeriodSecs, getLastExpiryCheckTime, getNonPersistentAttributes, getSavePeriodSecs, isNonPersistentAttributes, save, setGracePeriodSecs, setNonPersistentAttributes, setSavePeriodSecs
      • Methods inherited from class com.aspectran.core.component.AbstractComponent

        destroy, getComponentName, initialize, isAvailable, isDestroyed, isDestroying, isInitialized
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.aspectran.core.component.Component

        destroy, getComponentName, initialize, isAvailable, isDestroyed, isDestroying, isInitialized
    • Constructor Detail

      • ClusterLettuceSessionStore

        public ClusterLettuceSessionStore​(ConnectionPool<io.lettuce.core.cluster.api.StatefulRedisClusterConnection<java.lang.String,​com.aspectran.core.component.session.SessionData>> pool)
    • Method Detail

      • doInitialize

        protected void doInitialize()
                             throws java.lang.Exception
        Specified by:
        doInitialize in class com.aspectran.core.component.AbstractComponent
        Throws:
        java.lang.Exception
      • doDestroy

        protected void doDestroy()
                          throws java.lang.Exception
        Specified by:
        doDestroy in class com.aspectran.core.component.AbstractComponent
        Throws:
        java.lang.Exception
      • scan

        public void scan​(java.util.function.Consumer<com.aspectran.core.component.session.SessionData> func)
        Specified by:
        scan in class AbstractLettuceSessionStore
      • load

        public com.aspectran.core.component.session.SessionData load​(java.lang.String id)
      • delete

        public boolean delete​(java.lang.String id)
      • exists

        public boolean exists​(java.lang.String id)
      • doSave

        public void doSave​(java.lang.String id,
                           com.aspectran.core.component.session.SessionData data)
        Specified by:
        doSave in class com.aspectran.core.component.session.AbstractSessionStore