Class HotRodSessionRepository

  • All Implemented Interfaces:
    AutoCloseable, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.session.FindByIndexNameSessionRepository<SpringSession>, org.springframework.session.SessionRepository<SpringSession>, org.wildfly.clustering.Registrar<String>, org.wildfly.clustering.Registration, org.wildfly.clustering.web.LocalContextFactory<Void>

    public class HotRodSessionRepository
    extends Object
    implements org.springframework.session.FindByIndexNameSessionRepository<SpringSession>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.wildfly.clustering.web.LocalContextFactory<Void>, org.wildfly.clustering.Registrar<String>, org.wildfly.clustering.Registration
    A session repository whose sessions are persisted to a remote Infinispan cluster accessed via HotRod.
    Author:
    Paul Ferraro
    • Method Detail

      • afterPropertiesSet

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

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

        public org.wildfly.clustering.Registration register​(String name)
        Specified by:
        register in interface org.wildfly.clustering.Registrar<String>
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.wildfly.clustering.Registration
      • createLocalContext

        public Void createLocalContext()
        Specified by:
        createLocalContext in interface org.wildfly.clustering.web.LocalContextFactory<Void>
      • createSession

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

        public void deleteById​(String id)
        Specified by:
        deleteById in interface org.springframework.session.SessionRepository<SpringSession>
      • save

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

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