Class AbstractInfinispanSessionRepository

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.session.FindByIndexNameSessionRepository<org.springframework.session.MapSession>, org.springframework.session.SessionRepository<org.springframework.session.MapSession>
    Direct Known Subclasses:
    InfinispanEmbeddedSessionRepository, InfinispanRemoteSessionRepository

    public abstract class AbstractInfinispanSessionRepository
    extends java.lang.Object
    implements org.springframework.session.SessionRepository<org.springframework.session.MapSession>, org.springframework.session.FindByIndexNameSessionRepository<org.springframework.session.MapSession>, org.springframework.context.ApplicationEventPublisherAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    Infinispan implementation for Spring Session with basic functionality.
    Since:
    9.0
    Author:
    Sebastian Ɓaskawiec
    See Also:
    Spring Session Web Page, SessionRepository, ApplicationEventPublisherAware, FindByIndexNameSessionRepository
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      org.springframework.session.MapSession createSession()  
      void delete​(java.lang.String id)  
      void destroy()  
      java.util.Map<java.lang.String,​org.springframework.session.MapSession> findByIndexNameAndIndexValue​(java.lang.String indexName, java.lang.String indexValue)  
      org.springframework.session.MapSession getSession​(java.lang.String id)  
      org.springframework.session.MapSession getSession​(java.lang.String id, boolean updateTTL)
      Returns session with optional parameter whether or not update time accessed.
      void save​(org.springframework.session.MapSession session)  
      void setApplicationEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)  
      protected org.springframework.session.MapSession updateTTL​(org.springframework.session.MapSession session, boolean updateTTL)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.session.FindByIndexNameSessionRepository

        findByPrincipalName
      • Methods inherited from interface org.springframework.session.SessionRepository

        deleteById, findById
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • destroy

        public void destroy()
                     throws java.lang.Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception
      • setApplicationEventPublisher

        public void setApplicationEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
        Specified by:
        setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware
      • createSession

        public org.springframework.session.MapSession createSession()
        Specified by:
        createSession in interface org.springframework.session.SessionRepository<org.springframework.session.MapSession>
      • save

        public void save​(org.springframework.session.MapSession session)
        Specified by:
        save in interface org.springframework.session.SessionRepository<org.springframework.session.MapSession>
      • getSession

        public org.springframework.session.MapSession getSession​(java.lang.String id)
      • getSession

        public org.springframework.session.MapSession getSession​(java.lang.String id,
                                                                 boolean updateTTL)
        Returns session with optional parameter whether or not update time accessed.
        Parameters:
        id - Session ID.
        updateTTL - true if time accessed needs to be updated.
        Returns:
        Session or null if it doesn't exist.
      • updateTTL

        protected org.springframework.session.MapSession updateTTL​(org.springframework.session.MapSession session,
                                                                   boolean updateTTL)
      • delete

        public void delete​(java.lang.String id)
      • findByIndexNameAndIndexValue

        public java.util.Map<java.lang.String,​org.springframework.session.MapSession> findByIndexNameAndIndexValue​(java.lang.String indexName,
                                                                                                                         java.lang.String indexValue)
        Specified by:
        findByIndexNameAndIndexValue in interface org.springframework.session.FindByIndexNameSessionRepository<org.springframework.session.MapSession>